Next: Dynamic Extensions, Previous: Debugger, Up: Top [Contents][Index]
gawk
There’s a credibility gap: We don’t know how much of the computer’s answers to believe. Novice computer users solve this problem by implicitly trusting in the computer as an infallible authority; they tend to believe that all digits of a printed answer are significant. Disillusioned computer users have just the opposite approach; they are constantly afraid that their answers are almost meaningless.^{88}
This chapter discusses issues that you may encounter
when performing arithmetic. It begins by discussing some of
the general attributes of computer arithmetic, along with how
this can influence what you see when running awk
programs.
This discussion applies to all versions of awk
.
The chapter then moves on to describe arbitrary precision
arithmetic, a feature which is specific to gawk
.
• General Arithmetic:  An introduction to computer arithmetic.  
• Floatingpoint Programming:  Effective Floatingpoint Programming.  
• Gawk and MPFR:  How gawk provides
arbitraryprecision arithmetic.
 
• Arbitrary Precision Floats:  Arbitrary Precision Floatingpoint Arithmetic
with gawk .
 
• Arbitrary Precision Integers:  Arbitrary Precision Integer Arithmetic with
gawk .

Donald E. Knuth. The Art of Computer Programming. Volume 2, Seminumerical Algorithms, third edition, 1998, ISBN 0201896834, p. 229.