John Wallace Posted July 13, 2004 Posted July 13, 2004 OK - this is starting to bother me. Is 12.95 minus 12 really .949999999999999? Can anyone explain what is going on here? Try it for yourself. Create a number field (NumField) and put 12.95 in it. Then create a calculation that subtracts 12 from the NumField. What's the result? .949999999999999? Huh? NumFormat.zip
The Shadow Posted July 13, 2004 Posted July 13, 2004 Floating-point math, its actually done in base-2 (binary) not base ten (decimal), so the result doesn't always make sense back in the real world. FM7 fixes this, math is done in base-10. An interesting fact, 1/10 is infinitely repeating in binary form, since it cannot be cleanly represented as:
Recommended Posts
This topic is 7795 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now