Functions for converting to/from IEEE754 binary16 values.
- Java 75%
- C 21.6%
- Makefile 3.3%
- CSS 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo | ||
| com.io7m.ieee754b16.core | ||
| com.io7m.ieee754b16.tests | ||
| src/site/resources | ||
| .gitignore | ||
| doc7m-books.json | ||
| Makefile | ||
| pom.xml | ||
| README-algo.txt | ||
| README-CHANGES.xml | ||
| README-LICENSE.txt | ||
| README.in | ||
| README.md | ||
ieee754b16
ieee754b16
Java functions to convert to and from the IEEE754
binary16 type.
Features
- Conversion between
double/floatandbinary16values. - High coverage test suite (100%, minus an unreachable private constructor).
- OSGi-ready
- JPMS-ready
- ISC license.
Usage
The package uses the char type to store values of the binary16 type.
To convert a double-precision value 32.0 to binary16 format:
final char k = Binary16.packDouble(32.0);
To unpack values from the binary16 format:
final double r = Binary16.unpackDouble(k);
