Lably
Skip to content

Minifloat

Floating-point values coded as few bits

  • 9 min read
  • 3 chapters

Related on Lably

Through Computing, Machine learning and Infinity

  • Computer graphics, where human perception of color and light levels has low precision. The 16-bit half-precision format is very popular.
  • Machine learning, which can be relatively insensitive to numeric precision. 16-bit, 8-bit, and even 4-bit floats are increasingly being used.

Additionally, they are frequently encountered as a pedagogical tool in computer-science courses to demonstrate the properties and structures of floating-point arithmetic and IEEE 754 numbers.

Depending on context minifloat may mean any size less than 32, any size less or equal to 16, or any size less than 16. The term microfloat may mean any size less or equal to 8.

Notation

This page uses the notation (S.E.M) to describe a mini float:

  • S is the length of the sign field (0 or 1).
  • E is the length of the exponent field.
  • M is the length of the mantissa (significand) field.

Minifloats can be designed following the principles of the IEEE 754 standard. Almost all use the smallest exponent for subnormal and normal numbers. Many use the largest exponent for infinity and NaN, indicated by (special exponent) SE = 1. Some mini floats use this exponent value normally, in which case SE = 0.

The exponent bias B = 2E − 1 − SE. This value insures that all representable numbers have a representable reciprocal.

The notation can be converted to a (B,P,L,U) format as (2, M + 1, SE − 2E − 1 + 1, 2E − 1 − 1).

A common notation used in the field of machine learning is FPn EeMm, where the lowercase letters are replaced by numbers. For example, FP8-E4M3 is the same as (1.4.3).

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication