- or download this
a c a+c
--- + --- => -----
b d b+d
- or download this
a/b = 0/1
c/d = 1/0 [This is infinity, larger than any number]
- or download this
frac(3.14159265358979);
sub frac
...
($e,$f) = ($a+$c, $b+$d);
print "$a/$b < $x < $c/$d; => $e/$f\n";
} }
- or download this
1/1 < 3.14159265358979 < 1/0; => 2/1
2/1 < 3.14159265358979 < 1/0; => 3/1
...
2108/671 < 3.14159265358979 < 355/113; => 2463/784
2463/784 < 3.14159265358979 < 355/113; => 2818/897
2818/897 < 3.14159265358979 < 355/113; => 3173/1010