To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

In numerical analysis, one or more guard digits can be used to reduce the amount of roundoff error.

For example, suppose that the final result of a long, multi-step calculation can be safely rounded off to N decimal places. That is to say, the roundoff error introduced by this final roundoff makes a negligible contribution to the overall uncertainty.

However, it is quite likely that it is not safe to round off the intermediate steps in the calculation to the same number of digits. Be aware that roundoff errors can accumulate. If M decimal places are used in the intermediate calculation, we say there are M−N guard digits.

Guard digits are also used in floating point operations in most computer systems. Given we have to line up the binary points. This means we must add an extra digit to the first operand—a guard digit. This gives us . Performing this operation gives us or . Without using a guard digit we have , yielding or . This gives us a relative error of 1. Therefore, we can see how important guard digits can be.

An example of the error caused by floating point roundoff is illustrated in the following C code.

int main(){
   double a;
   int i;

   a = 0.2; 
   a += 0.1; 
   a -= 0.3;

   for (i = 0; a < 1.0; i++) 
       a += a;

   printf("i=%d, a=%f\n", i, a);

   return 0;
}

It appears that the program should not terminate. Yet the output is:

i=54, a=1.000000

Another example is:

Take two numbers:

and

We bring the first number to the same power of as the second one:

The addition of the two numbers is:

0.0256*10^2 
2.3400*10^2 +  
____________ 
2.3656*10^2 

After padding the second number (i.e., ) with two s, the bit after is the guard digit, and the bit after is the round digit. The result after rounding is as opposed to , without the extra bits (guard and round bits), i.e., by considering only . The error therefore is .

See also

References

  • Forman S. Acton. Numerical Methods that Work, The Mathematical Association of America (August 1997).
  • Higham, Nicholas J. Accuracy and Stability of Numerical Algorithms, Washington D.C.: Society for Industrial & Applied Mathematics, 2002.
  • IEEE 754 round-off errors
This page was last edited on 24 September 2023, at 16:59
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.