| |
|
| java.lang.Object com.vividsolutions.jts.index.quadtree.DoubleBits
DoubleBits | public class DoubleBits (Code) | | DoubleBits manipulates Double numbers
by using bit manipulation and bit-field extraction.
For some operations (such as determining the exponent)
this is more accurate than using mathematical operations
(which suffer from round-off error).
The algorithms and constants in this class
apply only to IEEE-754 double-precision floating point format.
version: 1.7 |
EXPONENT_BIAS | final public static int EXPONENT_BIAS(Code) | | |
DoubleBits | public DoubleBits(double x)(Code) | | |
biasedExponent | public int biasedExponent()(Code) | | Determines the exponent for the number
|
exponent | public static int exponent(double d)(Code) | | |
getBit | public int getBit(int i)(Code) | | |
getDouble | public double getDouble()(Code) | | |
getExponent | public int getExponent()(Code) | | Determines the exponent for the number
|
maximumCommonMantissa | public static double maximumCommonMantissa(double d1, double d2)(Code) | | |
numCommonMantissaBits | public int numCommonMantissaBits(DoubleBits db)(Code) | | This computes the number of common most-significant bits in the mantissa.
It does not count the hidden bit, which is always 1.
It does not determine whether the numbers have the same exponent - if they do
not, the value computed by this function is meaningless.
Parameters: db - the number of common most-significant mantissa bits |
powerOf2 | public static double powerOf2(int exp)(Code) | | |
toBinaryString | public static String toBinaryString(double d)(Code) | | |
toString | public String toString()(Code) | | A representation of the Double bits formatted for easy readability
|
truncateToPowerOfTwo | public static double truncateToPowerOfTwo(double d)(Code) | | |
zeroLowerBits | public void zeroLowerBits(int nBits)(Code) | | |
|
|
|