Sign in to follow this  
MustEatYemen

Floating Point Absorbtion

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this