20 #ifndef GEOS_IDX_QUADTREE_DOUBLEBITS_H
21 #define GEOS_IDX_QUADTREE_DOUBLEBITS_H
23 #include <geos/export.h>
24 #include <geos/platform.h>
49 static const int EXPONENT_BIAS=1023;
51 static double powerOf2(
int exp);
53 static int exponent(
double d);
55 static double truncateToPowerOfTwo(
double d);
57 static std::string toBinaryString(
double d);
59 static double maximumCommonMantissa(
double d1,
double d2);
63 double getDouble()
const;
66 int64 biasedExponent()
const;
69 int getExponent()
const;
71 void zeroLowerBits(
int nBits);
73 int getBit(
int i)
const;
87 int numCommonMantissaBits(
const DoubleBits& db)
const;
90 std::string toString()
const;
103 #endif // GEOS_IDX_QUADTREE_DOUBLEBITS_H
DoubleBits manipulates Double numbers by using bit manipulation and bit-field extraction.
Definition: DoubleBits.h:45