22 ms·
perl6 also use rationals (by default)... $ perl6 > 0.1 + 0.2 == 0.3 True > (0.1 + 0.2).perl 3/10 For perl5 you must use the bigrat pragma: $ re
by draegtun 12y ago
perl6 also use rationals (by default)...
$ perl6
> 0.1 + 0.2 == 0.3
True
> (0.1 + 0.2).perl
3/10
For perl5 you must use the bigrat pragma:
$ re.pl
> 0.1 + 0.2 != 0.3
1
> use bigrat;
> 0.1 + 0.2 == 0.3
1
ref: http://perldoc.perl.org/bigrat.html http://perldoc.perl.org/bigrat.html