In February 2017, Gustafson officially introduced Type III unums (posits), for fixed floating-point-like values and valids for
interval arithmetic. In March 2022, a standard was ratified and published by the Posit Working Group. Posits are a hardware-friendly version of unum where difficulties faced in the original type I unum due to its variable size are resolved. Compared to IEEE 754 floats of similar size, posits offer a bigger dynamic range and more fraction bits for values with magnitude near 1 (but fewer fraction bits for very large or very small values), and Gustafson claims that they offer better accuracy. Studies confirm that for some applications, posits with
quire out-perform floats in accuracy. Posits have superior accuracy in the range near one, where most computations occur. This makes it very attractive to the current trend in deep learning to minimize the number of bits used. It potentially helps any application to accelerate by enabling the use of fewer bits (since it has more fraction bits for accuracy) reducing network and
memory bandwidth and power requirements. The format of an
n-bit posit is given a label of "posit" followed by the decimal digits of
n (e.g., the 16-bit posit format is "posit16") and consists of four sequential fields: •
sign: 1 bit, representing an unsigned integer
s • regime: at least 2 bits and up to (
n − 1), representing an unsigned integer
r as described below •
exponent: generally 2 bits as available after regime, representing an unsigned integer
e •
fraction: all remaining bits available after exponent, representing a non-negative real
dyadic rational f less than 1 The regime field uses
unary coding of
k identical bits, followed by a bit of opposite value if any remaining bits are available, to represent an unsigned integer
r that is −
k if the first bit is 0 or
k − 1 if the first bit is 1. The sign, exponent, and fraction fields are analogous to IEEE 754 sign, exponent, and significand fields (respectively), except that the posit exponent and fraction fields may be absent or truncated and implicitly extended with zeroes—an absent exponent is treated as 002 (representing 0), a one-bit exponent E1 is treated as E102 (representing the integer 0 if E1 is 0 or 2 if E1 is 1), and an absent fraction is treated as 0. Negative numbers (
s is 1) are encoded as 2's complements. The two encodings in which all non-sign bits are 0 have special interpretations: • If the sign bit is 1, the posit value is NaR ("not a real") • If the sign bit is 0, the posit value is 0 (which is unsigned and the only value for which the sign function returns 0) Otherwise, the posit value is equal to ((1 - 3s) + f) \times 2^{(1 - 2s) \times (4r + e + s)}, in which
r scales by powers of 16,
e scales by powers of 2,
f distributes values uniformly between adjacent combinations of (
r,
e), and
s adjusts the sign symmetrically about 0.
Examples Quire For each posit
n type of precision n, the standard defines a corresponding "quire" type quire
n of precision 16 \times n, used to accumulate exact sums of products of those posits without rounding or overflow in
dot products for vectors of up to 231 or more elements (the exact limit is 2^{23 + 4n}). The quire format is a
two's complement signed integer, interpreted as a multiple of units of magnitude 2^{16 - 8n} except for the special value with a leading sign bit of 1 and all other bits equal to 0 (which represents NaR). Quires are based on the work of
Ulrich W. Kulisch and
Willard L. Miranker. == Valid ==