Posit Refinement Visualization
Universal numbers, unums for short, are for expressing real numbers, and ranges of real numbers. There are two modes of operation, selectable by the programmer, posit mode, and valid mode.
In posit mode, a unum behaves much like a floating-point number of fixed size, rounding to the nearest expressible value if the result of a calculation is not expressible exactly. A posit offers more accuracy and a larger dynamic range than floats with the same number of bits.
In valid mode, a unum represents a range of real numbers and can be used to rigorously bound answers much like interval arithmetic does.
The positive regime for a posit shows a very specific structure, as can be seen in the image blow:

Posit configurations have a very specific relationship to one another. When expanding a posit, the new value falls ‘between’ the old values of the smaller posit. The new value is the arithmetic mean of the two numbers if the expanding bit is a fraction bit, and it is the geometric mean of the two numbers if the expanding bit is a regime or exponent bit. Here is the starting progression from posit<2,0> to posit<7,1>:
The seed posit, posit<2,es>:

We can expand the precision and dynamic range by adding a bit: posit<3,es>:

The value of useed is a function of the number of exponent bits, es: useed = 2 ^ (2 ^ es).
| es | useed |
|---|---|
| 0 | 2 |
| 1 | 4 |
| 2 | 16 |
| 3 | 256 |
| 4 | 65536 |
| 5 | 4294967296 |
useed reflects the exponential step of the regime in a posit encoding. As you can see the regime, and thus the dynamic range for a posit grows rapidly as a function of the es value.
By picking a particular es, we can complete the mapping between posit encoding and real value. The following visualization shows the progression as we are adding bits to a posit. In this example, we have selected an es = 1.
posit<4,1>:

posit<5,1>:

posit<6,1>:

posit<7,1>:

These progressions are very handy to have as reference, not just for posits, so in the tables directory you can find different encoding to value tables for posits and other number systems in Universal.