Permalink
Browse files

* comment about acos_real

  • Loading branch information...
1 parent aefa108 commit c535b5004ad4c39b550ae42163574053637c7603 @eserte committed Aug 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 Strassen/Util.pm
View
@@ -179,7 +179,8 @@ sub abbiegen {
# XXX $a_len or $b_len == 0 is meaningless --- what should be done here
my $acos_arg = $a_len == 0 || $b_len == 0 ? 0 : ($a1*$b1+$a2*$b2)/($a_len*$b_len);
- # protect from floating point inaccuracies
+ # Protect from floating point inaccuracies.
+ # See also Math::Trig::acos_real (which is available since Math::Trig 1.12, bundled with perl 5.10.1 and newer)
if ($acos_arg > 1) { $acos_arg = 1 }
elsif ($acos_arg < -1) { $acos_arg = -1 }
my $angle = rad2deg(&$acos($acos_arg));

0 comments on commit c535b50

Please sign in to comment.