| JVM | Platform | Status |
|---|---|---|
| OpenJDK (Temurin) Current | Linux | |
| OpenJDK (Temurin) LTS | Linux | |
| OpenJDK (Temurin) Current | Windows | |
| OpenJDK (Temurin) LTS | Windows |
Java functions to convert to and from the IEEE754
binary16 type.
- Conversion between
double/floatandbinary16values. - High coverage test suite (100%, minus an unreachable private constructor).
- OSGi-ready
- JPMS-ready
- ISC license.
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);
