in reply to Strange rounding Error in Perl
Any programming language that doesn't expose you to this artifact of decimal to binary conversion for floating point numbers isn't telling the truth. The artifact is there, whether you're using BASIC, COBOL, Pascal, Perl, C/C++, etc. Whether or not you see it will depend on if the language hides it by performing behind the scenes rounding and consequential loss of precision.
See my answer here for a little more info. Trust me, it's not unique to Perl. We learned about it in Computer Science I, in high school in 1984, on the old Franklin Ace 1000 (Apple II similar) computers with FP-Basic.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange rounding Error in Perl
by pg (Canon) on Nov 22, 2004 at 17:30 UTC | |
by davido (Cardinal) on Nov 23, 2004 at 04:46 UTC |