Skip to main content
Definition Website Computer and Technology

Floating-Point Arithmetic

Subject: Computer and Technology noun /ˈfloʊ.tɪŋ ˌpɔɪnt əˈrɪθ.mə.tɪk/ 1 definition

  1. Definition (noun)

    Entry #137 · Updated

    Floating-Point Arithmetic is a numerical representation and computation system that encodes real numbers in a format analogous to scientific notation, separating each value into a sign, a fixed-precision significand, and an integer exponent over a fixed base (typically 2). By letting the radix point "float" across scales, it allows fixed-width binary hardware registers to handle both microscopic fractions and astronomical magnitudes within the same data type, trading uniform precision for broad dynamic range. Because finite binary representations cannot encode every rational or irrational value exactly, operations governed by standards such as IEEE 754 rely on deterministic rounding modes and define special states—including positive and negative infinity, signed zero, and Not a Number (NaN)—to handle overflow, underflow, and undefined results predictably.

    Common Forms

    • Single-Precision (FP32): Uses 32 bits (1 sign bit, 8 exponent bits, and 23 explicit significand bits) to provide roughly seven decimal digits of precision, making it a staple for 3D graphics, audio processing, and general-purpose scientific workloads where memory bandwidth matters.

    • Double-Precision (FP64): Allocates 64 bits (1 sign bit, 11 exponent bits, and 52 explicit significand bits) to achieve roughly 15 to 17 significant decimal digits, serving as the standard in engineering simulations, numerical linear algebra, and default floating-point types in languages such as Python and JavaScript.

    • Half-Precision and Brain Float (FP16 / BF16): Compresses values into 16-bit formats to double memory density and accelerate matrix math on GPUs and AI accelerators, with FP16 favoring higher mantissa precision and BF16 retaining the wide exponent range of FP32 for deep learning training.

    • Decimal Floating-Point: Represents values in base 10 rather than base 2 (such as IEEE 754 decimal64 or software decimal libraries) so base-10 fractions like 0.01 remain exact, preventing binary rounding errors in financial, tax, and billing systems.

    Example

    In an e-commerce checkout service written in JavaScript or Python, computing 0.1 + 0.2 using IEEE 754 double-precision floating-point arithmetic evaluates to 0.30000000000000004 rather than 0.3 because neither 0.1 nor 0.2 has an exact finite binary representation. To prevent rounding discrepancies from accumulating across thousands of line items, developers either store monetary totals as integer cents or switch to decimal floating-point arithmetic.