Yay Perl6. Took me a while to figure out the magic incantation, because the Perl6 documentation is nigh incomprehensible. Also, Rat() ignores the epsilon parameter if it's called on a rational. Sometimes, you'd like to find a fraction that's an approximation of another fraction without mashing it down to a float first.> 0.49420098210293.nude (49420098210293 100000000000000) > 0.49420098210293.Num().Rat(1e-15).nude (463051 936969)
In reply to Re^2: decimal to fraction
by no_slogan
in thread decimal to fraction
by no_slogan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |