Number System Hierarchy

The number systems contained within Universal are organized by their natural set theoretic association.

We have unsigned integers, signed integers, rationals and fixed-points, regular floats, tapered floats, and logarithmic number systems. And any of these can be mixed into std::complex<>.

The following diagram shows the Universal number system names and their coverage within the mathematical sets.

Universal number systems hierarchy

Most of the number systems within Universal are parameterized in size, but fixed-size when articulated. For example, there is a generic posit<nbits, es> number system with nbits[2,...)nbits \in [2, ...) and es[0,9]es \in [0, 9], but when articulated as, say, posit<8,2>, it is an 8-bit fixed-size data type that can be used in vectors, matrices, and tensors in a memory-efficient layout. The designer can also control the alignment to make certain that certain processor data access constraints are honored for performance.

In general, an algorithm designer can explore any refinement of the number systems in terms of

  1. precision

  2. dynamic range

  3. memory storage and alignment

  4. arithmetic: for example, modulo or saturating to value, or saturating to infinity

  5. sampling profile: for example, logarithmic, linear, exponential, or even custom functions

All of the fixed-size number systems that are subject to rounding to stay within the allocated encodings during arithmetic operations will have a programmable super-accumulator to enable user-defined deferred rounding. In particular, Universal offers a fused dot product operator for its number systems.

Universal also offers empirical error estimates and programmable arithmetic exceptions to catch overflow, underflow, division by zero, and manipulations of infinite and nan encodings, to aid in numerical analysis and numerical debug.

Finally, Universal offers adaptive, infinite precision versions that are useful as Oracles.

Universal is designed to be the primary resource to design, test, debug, and optimize energy-efficient algorithms for high-performance and embedded applications.

Last updated