Department of Energy Argonne National Laboratory Office of Science NEWTON's Homepage NEWTON's Homepage
NEWTON, Ask A Scientist!
NEWTON Home Page NEWTON Teachers Visit Our Archives Ask A Question How To Ask A Question Question of the Week Our Expert Scientists Volunteer at NEWTON! Frequently Asked Questions Referencing NEWTON About NEWTON About Ask A Scientist Education At Argonne Floating Point Accuracy
Name: Danlee
Status: N/A
Age: N/A
Location: N/A
Country: N/A
Date: Around 1993


Question:
Given double precision an IEEE double precision floating point calculation, is there anything thing that can be said in general about round- off error? For example, given N multiplications and N additions, is there some limit on N below which one can expect, say, seven decimal digits of accuracy?



Replies:
It is hard to say anything useful in general terms, because the effect of round-off error depends very strongly on the relative sizes of the things you are operating on. Here is the nutshell: Floating point numbers are stored as a number and an exponent, so very large and very small numbers can be stored with equal accuracy (up to a point that depends on how many bits are allocated to the exponent). To ADD two numbers, however, they must first be converted so that they have the same exponent. If the exponents differ by N, you lose N bits of precision somewhere. If you have a very large number and a very small one, you can lose ALL of the smaller number in a single addition.

Mooney



Click here to return to the Computer Science Archives

NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators, sponsored and operated by Argonne National Laboratory's Educational Programs, Andrew Skipor, Ph.D., Head of Educational Programs.

For assistance with NEWTON contact a System Operator (help@newton.dep.anl.gov), or at Argonne's Educational Programs

NEWTON AND ASK A SCIENTIST
Educational Programs
Building 360
9700 S. Cass Ave.
Argonne, Illinois
60439-4845, USA
Update: June 2012
Weclome To Newton

Argonne National Laboratory