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 why it's happening, but I've been writing some really inelegant rounding routines to try to fix it. Any ideas?
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 why it's happening, but I've been writing some really inelegant rounding routines to try to fix it. Any ideas?