Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
modf is now a local function instead of a private function; call it a…
…ccordingly.
  • Loading branch information
colomon committed May 19, 2010
1 parent 8816781 commit ad8556c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Num.pm
Expand Up @@ -44,12 +44,12 @@ augment class Num does Real {
# Find convergents of the continued fraction.
my ($r, $q) = self!modf($num);
my ($r, $q) = modf($num);
my ($a, $b) = 1, $q;
my ($c, $d) = 0, 1;
while $r != 0 && abs($num - ($b/$d)) > $epsilon {
($r, $q) = self!modf(1/$r);
($r, $q) = modf(1/$r);
($a, $b) = ($b, $q*$b + $a);
($c, $d) = ($d, $q*$d + $c);
Expand Down

0 comments on commit ad8556c

Please sign in to comment.