# Number System Hierarchy

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

![](/files/an9pcAatBQR2swdscLNx)

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](/files/5WCkoEhaPBIGrjupRQ6p)

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 \in \[2, ...)$$ and $$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&#x20;

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.

{% hint style="info" %}
*Universal* is designed to be the primary resource to design, test, debug, and optimize energy-efficient algorithms for high-performance and embedded applications.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stillwater-supercomputing-inc.gitbook.io/universal-numbers/what-is-universal/number-system-hierarchy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
