Arbitrary Precision Arithmetic (The GNU Awk User’s Guide)

From Get docs
Gawk/docs/latest/Arbitrary-Precision-Arithmetic

Next: Dynamic Extensions, Previous: Namespaces, Up: Top   [Contents][Index]



16 Arithmetic and Arbitrary-Precision Arithmetic with gawk

This chapter introduces some basic concepts relating to how computers do arithmetic and defines some important terms. It then proceeds to describe floating-point arithmetic, which is what awk uses for all its computations, including a discussion of arbitrary-precision floating-point arithmetic, which is a feature available only in gawk. It continues on to present arbitrary-precision integers, and concludes with a description of some points where gawk and the POSIX standard are not quite in agreement.

NOTE: Most users of gawk can safely skip this chapter. But if you want to do scientific calculations with gawk, this is the place to be.

Computer Arithmetic    A quick intro to computer math.
Math Definitions    Defining terms used.
MPFR features    The MPFR features in gawk.
FP Math Caution    Things to know.
Arbitrary Precision Integers    Arbitrary Precision Integer Arithmetic with gawk.
Checking for MPFR    How to check if MPFR is available.
POSIX Floating Point Problems    Standards Versus Existing Practice.
Floating point summary    Summary of floating point discussion.