To me, it's incredibly naïve to complain about a base 2 approximation of 0.3 minus a base 2 approximation of 0.2 minus a base 2 approximation of 0.1 resulting in a minute non-zero value.I don't complain about that, and I am not naive enough to ignore that base 2 approximations of decimal non-integer numbers are not going to be accurate. I am complaining about the fact that we should still rely on base 2 approximations. It really should no longer be the case 18 years into the 21st century.
Yes, I will probably convert 132511/43 into a FP approximate value only if I need it as a human to estimate the magnitude, but not if my aim is to store the value in a computer and if I am given the technical means to store it as a rational. This FP approximation has plagued us for almost half a century, I know we won't get rid of it overnight and that it will continue to plague us for quite a while, but I just hope it won't be for another half century. And for that to happen, we need to start somewhere. Perl 6's arithmetic model is a start.
And I would think (untested) that perl5's Math::GMPq module provides better rational arithmetic than perl6 ever will.Maybe. Or maybe not. I just don't know.
I was not saying that Perl 6's arithmetic model should be in itself a reason for you or for me to use Perl 6, I was only answering another monk who picked on that topic.
In reply to Re^5: Reasons for Using Perl 6
by Laurent_R
in thread Reasons for Using Perl 6
by aartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |