|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Static Public Member Functions | |
| static char | exampleNaN () |
| One possible not-a-number value. More... | |
| static boolean | isInfinite (final char k) |
Return true if the given packed binary16 value is infinite. More... | |
| static boolean | isNaN (final char k) |
Return true if the given packed binary16 value is not a number (NaN). More... | |
| static char | packDouble (final double k) |
| static char | packFloat (final float k) |
| static char | packSetExponentUnbiasedUnchecked (final int e) |
| static char | packSetSignificandUnchecked (final int s) |
| static char | packSetSignUnchecked (final int s) |
| static String | toRawBinaryString (final char k) |
Show the given raw packed binary16 value as a string of binary digits. More... | |
| static double | unpackDouble (final char k) |
| static float | unpackFloat (final char k) |
| static int | unpackGetExponentUnbiased (final char k) |
| static int | unpackGetSign (final char k) |
Retrieve the sign bit of the given packed binary16 value, as an integer in the range [0, 1]. More... | |
| static int | unpackGetSignificand (final char k) |
Static Public Attributes | |
| static final char | NEGATIVE_INFINITY |
The encoded form of negative infinity -∞. More... | |
| static final char | POSITIVE_INFINITY |
The encoded form of positive infinity ∞. More... | |
| static final char | POSITIVE_ZERO |
The encoded form of positive zero 0. More... | |
| static final char | NEGATIVE_ZERO |
The encoded form of negative zero -0. More... | |
| static final int | BIAS |
| The bias value used to offset the encoded exponent. More... | |
Functions to convert values to/from the binary16 format specified in IEEE 754 2008.
Definition at line 38 of file Binary16.java.
|
static |
One possible not-a-number value.
Definition at line 93 of file Binary16.java.
|
static |
Return true if the given packed binary16 value is infinite.
Definition at line 107 of file Binary16.java.
|
static |
Return true if the given packed binary16 value is not a number (NaN).
Definition at line 123 of file Binary16.java.
|
static |
Convert a double precision floating point value to a packed binary16 value.
For the following specific cases, the function returns:
NaN iff isNaN(k) POSITIVE_INFINITY iff k == Double#POSITIVE_INFINITY NEGATIVE_INFINITY iff k == Double#NEGATIVE_INFINITY NEGATIVE_ZERO iff k == -0.0 POSITIVE_ZERO iff k == 0.0 Otherwise, the binary16 value that most closely represents k is returned. This may obviously be an infinite value as the interval of double precision values is far larger than that of the binary16 type.
Definition at line 158 of file Binary16.java.
|
static |
Convert a single precision floating point value to a packed binary16 value.
For the following specific cases, the function returns:
NaN iff isNaN(k) POSITIVE_INFINITY iff k == Float#POSITIVE_INFINITY NEGATIVE_INFINITY iff k == Float#NEGATIVE_INFINITY NEGATIVE_ZERO iff k == -0.0 POSITIVE_ZERO iff k == 0.0 Otherwise, the binary16 value that most closely represents k is returned. This may obviously be an infinite value as the interval of single precision values is far larger than that of the binary16 type.
Definition at line 231 of file Binary16.java.
|
static |
Encode the unbiased exponent e. Values should be in the range [-15, 16] - values outside of this range will be truncated.
Definition at line 287 of file Binary16.java.
|
static |
Encode the significand s. Values should be in the range [0, 1023]. Values outside of this range will be truncated.
Definition at line 305 of file Binary16.java.
|
static |
Encode the sign bit s. Values should be in the range [0, 1], with 0 ironically denoting a positive value. Values outside of this range will be truncated.
Definition at line 322 of file Binary16.java.
|
static |
Show the given raw packed binary16 value as a string of binary digits.
Definition at line 335 of file Binary16.java.
|
static |
Convert a packed binary16 value k to a double-precision floating point value.
The function returns:
NaN iff isNaN(k) Double#POSITIVE_INFINITY iff k == POSITIVE_INFINITY Double#NEGATIVE_INFINITY iff k == NEGATIVE_INFINITY -0.0 iff k == NEGATIVE_ZERO 0.0 iff k == POSITIVE_ZERO (-1.0 * n) * (2 ^ e) * 1.s, for the decoded sign n of k, the decoded exponent e of k, and the decoded significand s of k. Definition at line 376 of file Binary16.java.
|
static |
Convert a packed binary16 value k to a single-precision floating point value.
The function returns:
NaN iff isNaN(k) Float#POSITIVE_INFINITY iff k == POSITIVE_INFINITY Float#NEGATIVE_INFINITY iff k == NEGATIVE_INFINITY -0.0 iff k == NEGATIVE_ZERO 0.0 iff k == POSITIVE_ZERO (-1.0 * n) * (2 ^ e) * 1.s, for the decoded sign n of k, the decoded exponent e of k, and the decoded significand s of k. Definition at line 450 of file Binary16.java.
|
static |
Extract and unbias the exponent of the given packed binary16 value.
The exponent is encoded biased as a number in the range [0, 31], with 0 indicating that the number is subnormal and [1, 30] denoting the actual exponent plus BIAS. Infinite and NaN values always have an exponent of 31.
This function will therefore return:
0 - BIAS = -15 iff the input is a subnormal number. [1 - BIAS, 30 - BIAS] = [-14, 15] iff the input is a normal number. 16 iff the input is POSITIVE_INFINITY, NEGATIVE_INFINITY, or NaN. Definition at line 529 of file Binary16.java.
|
static |
Retrieve the sign bit of the given packed binary16 value, as an integer in the range [0, 1].
Definition at line 544 of file Binary16.java.
|
static |
Return the significand of the given packed binary16 value as an integer in the range [0, 1023].
Definition at line 559 of file Binary16.java.
|
static |
The bias value used to offset the encoded exponent.
A given exponent e is encoded as . BIAS + e
Definition at line 69 of file Binary16.java.
|
static |
The encoded form of negative infinity -∞.
Definition at line 44 of file Binary16.java.
|
static |
The encoded form of negative zero -0.
Definition at line 62 of file Binary16.java.
|
static |
The encoded form of positive infinity ∞.
Definition at line 50 of file Binary16.java.
|
static |
The encoded form of positive zero 0.
Definition at line 56 of file Binary16.java.