-
-
Notifications
You must be signed in to change notification settings - Fork 59
Home
Welcome to the Universal Numbers wiki!
Universal is a C++17/20 header-only library for plug-in replacements of native arithmetic types. Custom arithmetic types can be used to optimize algorithmic performance, energy efficiency, numerical robustness, and computational reproducibility.
The library consists of two different classes of arithmetic types:
- elastic types that adapt their precision dynamically
- static types that use a fixed storage size once declared
Elastic types are targeting dynamic computations that require precision. Static types are useful for tensor and linear algebra as the memory layout of aggregate types is consistent.
The library contains the following elastic number systems:
- adaptive binary integer: einteger
- adaptive decimal: edecimal
- adaptive decimal rational: erational
- adaptive segmented floating-point: priest
And the following static number systems:
- binary integer: integer<nbits>
- binary fixed-point: fixpnt<nbits, rbits>
- decimal fixed-point: deci<ndigits, rdigits>
- classic floating-point: cfloat<nbits, es>
- Brain float: bfloat16
- fast double-double: dd
- fast quad-double: qd
- tapered floating-point: posit<nbits, es>
- logarithmic number system: lns<nbits, rbits>
- double base: dbns<nbits, rbits>
- faithful with uncertainty bit: areal<nbits, es>
- tapered interval arithmetic: valid<nbits, es>
- Kulisch super-accumulator for floating-point: quire<nbits, es, capacity>
C++20 enables constexpr operations for floating-point types.
Universal is used to design and optimize mixed-precision algorithms for HPC and AI applications. In addition to increasing performance and improving energy efficiency, Universal also contains high-performance reproducible computation for safety and reliability applications.
universal