Package com.jogamp.opengl.math
Class Binary64
java.lang.Object
com.jogamp.opengl.math.Binary64
Functions for interrogating
binary64 (double) values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longunpackGetExponentUnbiased(double d) Extract and unbias the exponent of the given packeddoublevalue.static longunpackGetSign(double d) Return the sign of the given double value.static longunpackGetSignificand(double d) Return the significand of the given double value.
-
Constructor Details
-
Binary64
public Binary64()
-
-
Method Details
-
unpackGetExponentUnbiased
public static long unpackGetExponentUnbiased(double d) Extract and unbias the exponent of the given packed
doublevalue.The exponent is encoded biased as a number in the range
[0, 2047], with0indicating that the number is subnormal and[1, 2046]denoting the actual exponent plusBIAS. Infinite andNaNvalues always have a biased exponent of2047.This function will therefore return:
-
0 -iff the input is a subnormal number.BIAS= -1023 - An integer in the range
[1 -iff the input is a normal number.BIAS, 2046 -BIAS] = [-1022, 1023] -
2047 -iff the input isBIAS= 1024#POSITIVE_INFINITY,#NEGATIVE_INFINITY, orNaN.
- See Also:
-
#packSetExponentUnbiasedUnchecked(int)
-
-
unpackGetSignificand
public static long unpackGetSignificand(double d) Return the significand of the given double value.
-
unpackGetSign
public static long unpackGetSign(double d) Return the sign of the given double value.
-