Number System Hierarchy
Last updated
Last updated
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.
In general, an algorithm designer can explore any refinement of the number systems in terms of
precision
dynamic range
memory storage and alignment
arithmetic: for example, modulo or saturating to value, or saturating to infinity
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.
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 and , 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.