semiAIfoundry

mathematical-foundations · Atlas v1.3.0

Floating-point range, resolution and rounding

Explains which numerical values a finite bit pattern can represent before those values enter a learned computation.

Explore in AtlasMathematical and data space; dimensions are not physical distance

Learning objectiveEncode a value in a declared miniature format and diagnose rounding, gradual underflow and overflow.

The mechanism

Floating-point formats distribute representable numbers across a range of magnitudes. An exponent controls scale while fraction bits provide resolution within that scale. A sign bit, exponent field and fraction field must be interpreted under an explicit encoding convention. The workbench defines its own seven-bit format: one sign bit, three exponent bits, three fraction bits and exponent bias 3. It reserves the all-ones exponent for special values, supports subnormals near zero and rounds ties toward an even low-order significand bit. This is a fully enumerated teaching format, not an assertion about a vendor’s FP8 implementation. Seeing the exact stored bits makes it possible to separate representability error from changes in an algorithm.

  1. Separate the sign and magnitude, then identify the normal exponent interval or subnormal range.
  2. Find adjacent representable magnitudes and round to the nearest, resolving exact midpoints with the declared even-bit rule.
  3. Inspect the stored sign/exponent/fraction fields and the absolute difference from the input.
  4. Probe the boundaries where spacing changes, a small value rounds to zero or a large value overflows.

Science and assumptions

Floating-point range, resolution and rounding

x=(−1)s{2−2 f/8,e=0,2e−3(1+f/8),1≤e≤6.x=(-1)^s\begin{cases}2^{-2}\,f/8,&e=0,\\2^{e-3}(1+f/8),&1\le e\le6.\end{cases}

Subnormals use exponent minus two without the implicit leading one; normal finite values use biased exponent e minus three and an implicit leading one.

Symbols and units
s
Sign field

bit

e
Stored exponent field

integer

f
Stored fraction field from zero to seven

integer

x
Represented finite value

dimensionless

In this format, 1.0625 lies halfway between 1 and 1.125 and rounds to 1. The midpoint 1.1875 rounds to 1.25. The smallest positive subnormal is 1/32=0.03125; 1/64 is a tie that rounds to zero. The largest finite value is 15, and 15.5 reaches the nearest-rounding overflow threshold.

Assumptions This authored seven-bit format uses bias 3, gradual underflow and nearest ties-to-even. Exponent 7 is special and excluded from the finite expression.

Engineering example

In this format, 1.0625 lies halfway between 1 and 1.125 and rounds to 1. The midpoint 1.1875 rounds to 1.25. The smallest positive subnormal is 1/32=0.03125; 1/64 is a tie that rounds to zero. The largest finite value is 15, and 15.5 reaches the nearest-rounding overflow threshold.

Distinctions and tradeoffs

A datatype name or bit count does not specify all rounding, saturation, subnormal and accumulation behavior.

More exponent bits extend dynamic range; more fraction bits refine spacing. Neither change alone establishes model accuracy, latency or energy savings.

Training and inference depend on representable activations, weights, gradients and accumulations. Low precision needs explicit scale, accumulation and error contracts.

Specifications and interfaces

Teaching specimen
Represent a number

In this format, 1.0625 lies halfway between 1 and 1.125 and rounds to 1. The midpoint 1.1875 rounds to 1.25. The smallest positive subnormal is 1/32=0.03125; 1/64 is a tie that rounds to zero. The largest finite value is 15, and 15.5 reaches the nearest-rounding overflow threshold.

Evidence boundary
Explicit computed example

This authored seven-bit format uses bias 3, gradual underflow and nearest ties-to-even. Exponent 7 is special and excluded from the finite expression.

Interfaces

Inputs and convention Input
Separate the sign and magnitude, then identify the normal exponent interval or subnormal range.
Computed result and scope Output
Encode a value in a declared miniature format and diagnose rounding, gradual underflow and overflow.

Check your understanding

What primarily changes when fraction bits are increased at fixed exponent width?

  1. The spacing between representable values within a magnitude interval
  2. The meaning of the target label
  3. The physical number of training examples
Answer and reasoning

The spacing between representable values within a magnitude interval

The spacing between representable values within a magnitude interval. This authored seven-bit format uses bias 3, gradual underflow and nearest ties-to-even. Exponent 7 is special and excluded from the finite expression.

Evidence and scope

The workbench executes the declared small mechanism. Numeric examples are authored and independently checked, not measurements from the cited research. This authored seven-bit format uses bias 3, gradual underflow and nearest ties-to-even. Exponent 7 is special and excluded from the finite expression.

Open Mathematical foundations for the bounded executable mechanism and its record. General numerical labs are an additional reference library.

Sources

Published lesson data · Atlas releases and licensing

Continue exploring

Related lessons