Skip to content

Commit

Permalink
adding arbitrary precision type design document
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenwater committed Oct 29, 2024
1 parent 76b3562 commit 3682d33
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,9 @@ applications are requantized to small integers to fit their very stringent power
has been researching better number systems to address both power and performance requirements,
but all these efforts have worked in isolation, with results being difficult to reproduce.

AI applications are only some of the applications that expose the limitations of traditional hardware.
Inefficiencies in numeric storage and operations also limit cloud scale, IoT, embedded,
and HPC applications. A simple change to a new number system may improve the scale and cost of these
applications by orders of magnitude.
AI applications are only some of the applications that expose the limitations of traditional hardware. Inefficiencies in numeric storage and operations also limit cloud scale, IoT, embedded, and HPC applications. A simple change to a new number system may improve the scale and cost of these applications by orders of magnitude.

When performance and power efficiency are the differentiating attributes for a use case,
arithmetic systems that are tailored to the needs of the application are desired.
When performance and power efficiency are the differentiating attributes for a use case, arithmetic systems that are tailored to the needs of the application are desired.

In particular, there are two concerns when using the IEEE-754 floating-point formats:

Expand Down Expand Up @@ -692,14 +688,17 @@ Here is a complete list:
- *universal/number/lns* - arbitrary configuration logarithmic number system with fixed-point exponent
- *universal/number/dbns* - double base number system with integer exponents
- *universal/number/sorn* - set of real numbers
- *universal/number/dd* - multi-component double-double floating-point format
- *universal/number/qd* - multi-component quad-double floating-point format

### _elastic_ adaptive-precision configurations

- *universal/number/decimal* - adaptive-precision decimal integer
- *universal/number/einteger* - adaptive-precision binary integer
- *universal/number/rational* - adaptive-precision rational number system
- *universal/number/efloat* - adaptive-precision linear floating-point
- *universal/number/eposit* - adaptive-precision tapered floating-point
- *universal/number/efloat* - multi-digit adaptive-precision floating-point
- *universal/number/ereal* - multi-component exact floating-point
- *universal/number/elreal* - multi-component exact lazy floating-point

### super-accumulator facilities

Expand All @@ -721,6 +720,9 @@ In _valid_ mode, a unum represents a range of real numbers and can be used to bo
Posit configurations have a 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.
This [page](docs/PositRefinementViz.md) shows a visualization of the expansion of _posit<2,0>_ to _posit<7,1>_:

## Documentation

The [docs](docs/README.md) directory contains design documents and tutorials for the _Universal_ library types.


## Public Domain and community resources
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Tutorials:
1. [command line tools description](command-line-tools.md)
2. [number type parameterization](number-system-type-parameterization.md)
3. [posit refinement](posit-refinement-viz.md)
4. [arbitrary precision type design](arbitrary-precision-design.md)

## deep_learning

Expand Down
44 changes: 44 additions & 0 deletions docs/arbitrary-precision-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Arbitrary precision type design

When a numerical computation is required to deliver a binary [yes/no|in/out] result
via a floating-point computation, the required computational precision is unknown a-priori.
In such cases, especially during exploration, an adaptive, arbitrary precision arithmetic
can be used to study the results and the computational dynamics that lead to that result.

There are two adaptive arithmetic floating-point types that have been developed:
<ol>
<li>a value modeled as a triple, < sign, exponent, adaptive multi-limb significant > </li>
<li>a value modeled as a composite sum of floating-point values </li>
</ol>

The first construction is called a **multi-digit** format, while the second type is referred to as **multi-component**.
The benefit of a multi-component format is the sparse representation of complex values, but a disadvantage is computational results need to be normalized before storage or continued calculations. In contrast, a multi-digit format can be used without normalization but tends to be verbose.

Another benefit of the multi-component format is that it can be executed on existing floating-point hardware resulting in a relatively high-performance (tens of MOPS on GOPS hardware). However, the fixed exponent of the hardware will limit the attainable precision.

The <i>Universal</i> library supports both representations, in static and elastic (=adaptive) incarnations.

* multi-digit
* static
> areal: faithful format with an uncertainty bit
> cfloat: a classic binary floating-point
> dfloat: decimal floating-point
> hfloat: hexadecimal floating-point
* elastic
> efloat: elastic binary floating-point
* multi-component
* static
> dd (double-double)
> qd (quad-double)
* elastic
> ereal: exact real
> elreal: exact lazy real

0 comments on commit 3682d33

Please sign in to comment.