Jump to content
  • Advertisement
Sign in to follow this  
MustEatYemen

Floating Point Absorbtion

This topic is 4726 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone have a convient way to determine the fall off of accuracy in a IEEE Floating point? I'm trying to avoid the absorption issue as the floating point grows larger. http://en.wikipedia.org/wiki/Floating-point#Problems_with_floating-point. Basically I'd like to ensure percision of adding 0.01, so I'm wondering when the addition (or subtraction) will cease to be tallied because of rounding. So far I'm short of going and pouring over IEEE 754, but if there is a convient way to determine this that I'm not seeing, feel free to enlighten.

Share this post


Link to post
Share on other sites
Advertisement
Basically multiply the magnitude of the value by the machine epsilon for the data type and you'll get the minimum value to add to the number that will change the value.

Share this post


Link to post
Share on other sites
Danke
Edit: Results
Working from MSVC off double / long double (same size in MSVC, 64bit)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/_clang_limits_on_floating.2d.point_constants.asp


DBL_EPSILON = 2.2204460492503131e-016 -> 0.00000000000000022204460492503131
Rounding down to the the first whole increment of 1, makes the
DBL_EPSILON 1e-15, 0.000000000000001
Now if I'm understand things correctly.
Since I only need percision too 0.01 or 1e-2, that gives me up to 1e13 and still able to be accurate to 0.01

Sorry if the above sounds horrible especially to math or science majors. ;)

[Edited by - MustEatYemen on July 10, 2005 11:45:56 PM]

Share this post


Link to post
Share on other sites
Just remember that my math would be off because the system isn't base10 but base2. So JohnBolton is correct, and I'll tweak it, but that's the general idea. ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!