IT lexicon › Programming › Float

Float Floating-point

Programming På svenska → Updated: 2026-05-24

Approximation of real numbers via IEEE 754. Different precisions: float16 (16 bits, ML), float32 (single, default), float64 (double, scientific), float128 (rare).

IEEE 754 (1985) standardized format + NaN, ±Infinity, subnormals. Subtracting nearby values loses precision (catastrophic cancellation). 0.1 + 0.2 ≠ 0.3 in float — classic gotcha. Modern AI formats: bfloat16 (8-bit exponent, 7-bit mantissa — better range, same memory as float16), TF32, FP8 (H100/B200). Decimal libraries (Python decimal, BigDecimal) for finance.

← Back to the lexicon