I searched around a bit on my own, and I found that I may be suffering from the way Perl (and other languages, apparently) represent floating point numbers in binary form.
http://perldoc.perl.org/perlfaq4.html#Data%3a-Numbers
I didn't post my code because it didn't happen every time - I'd have...
I'm having a weird problem, and I'm hoping that somebody can put me on the path to fixing it.
I have a number of scripts where I perform a subtraction operation and get a weird result. I get things like 6 - 0.2 = 5.8000000001 or 5.79999999999 instead of just good ol' vanilla 5.8. I'm not sure...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.