Re: The 0.0000000000001 bug
Re: The 0.0000000000001 bug
But then it gets rid of the decimal point altogether :(
Re: The 0.0000000000001 bug
Round then add .01
i have nver seen this bug
Re: The 0.0000000000001 bug
But if it's 0.4 and you round it then add 0.1, you end up with 0.1 instead of 0.4?
Re: The 0.0000000000001 bug
if its .4, then the glitch hasnt occured? and everything is ok?
Re: The 0.0000000000001 bug
I agree this is annyoing. MMF uses single-precision floats. I really hope that MMF3 won't - that way, floating point calculations will be much more accurate.
Anyway, I also hope for optional parameters in MMF3, so e.g. you can specify the number of digits to round to using Round(), like in PHP.
round(1.234) = 1
round(1.234,2) = 1.23
Re: The 0.0000000000001 bug
@lookie
round(1.234,2) = 1.23 or
round(1.234*100)/100.0 = 1.23
Re: The 0.0000000000001 bug
All programming languages have problems with the precision of floating points data types. Even doubles have the issue you are talking about but it might take longer before you can see it.
It happens because you cannot have infinite precision with a finite number of bits. At some point you get to a number that the bits cannot represent and it has to set the value to the closest value it can represent.
Re: The 0.0000000000001 bug
Quote:
MMF uses single-precision floats.
No, MMF uses double-precision flotaing point values since the build 243 (except for values passed to / retrieved from extension objects).