https://github.com/lionello/unumd
Unums in D
https://github.com/lionello/unumd
Last synced: 2 months ago
JSON representation
Unums in D
- Host: GitHub
- URL: https://github.com/lionello/unumd
- Owner: lionello
- Created: 2015-11-15T02:47:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-20T05:45:36.000Z (over 9 years ago)
- Last Synced: 2025-02-05T23:27:37.961Z (4 months ago)
- Language: D
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unumd
Unums (Universal Numbers) in D. See http://www.slideshare.net/insideHPC/unum-computing-an-energy-efficient-and-massively-parallel-approach-to-valid-numerics for an introduction.This attempt at an implementation does not exactly implement Unums as described by John Gustafson, with their dynamic exponent and fraction components.
Instead it uses native floating point types as fixed storage, thereby putting an upper limit on the number of bits available to the exponent and fraction.It does add the `Ubit` (which signals whether a Unum is exact or inexact) and tracks the number of significant bits (as opposed to regular floating point values which assume that all bits are significant).
The `Ubit` and `precision` fields are stored in the native floating point value, overwriting the least significant bits.
For inexact Unums this has the funny benefit of keeping their value within the Unum range they're representing: lower-bound ≤ float-value ≤ upper-bound. For exact Unums these utag bits will have to be cleared to retrieve the correct value.