nfield · documentation

Arbitrary precision

Keep the value. Choose the display.

Arbitrary precision is part of the intended spreadsheet interface. It means calculations are not restricted to the precision of an ordinary floating-point cell. Available memory and calculation limits still apply.

Integers

Pass large integers as text. Addition, subtraction, multiplication and integer powers can return exact integer text without silently converting through a floating-point value.

=NF_BIG_ADD("9007199254740992","1")
→ "9007199254740993"

Rationals

Keep a fraction as a reduced numerator and denominator. One third can remain "1/3" through exact arithmetic. Division by zero is an error.

=NF_BIG_DIVIDE("1","3")
→ "1/3"

Rounded decimals

A decimal conversion must specify significant digits and a rounding mode. For a repeating rational, the result is a rounded display of the exact source value.

=NF_DECIMAL_ROUND("1/3",50,"HALF_EVEN")

Numerical functions

Fourier transforms, eigenvalues and other numerical operations need their own precision contracts. A requested working precision does not automatically establish a rigorous error bound. The function reference will state which computations support configurable precision as those implementations are completed.

Preserve the input first

An engine cannot recover digits already rounded by the spreadsheet. Use text for large integers and exact fractions from the beginning. Export exact strings beside any approximate numeric columns.

The formulas on this page specify the developing interface. They are not an installed add-in or a claim that every nfield numerical command already supports arbitrary precision.