#include <CommonBits.h>
Public Member Functions | |
| void | add (double num) |
| double | getCommon () |
Static Public Member Functions | |
| static int64 | signExpBits (int64 num) |
| Computes the bit pattern for the sign and exponent of a double-precision number. | |
| static int | numCommonMostSigMantissaBits (int64 num1, int64 num2) |
| This computes the number of common most-significant bits in the mantissas of two double-precision numbers. | |
| static int64 | zeroLowerBits (int64 bits, int nBits) |
| Zeroes the lower n bits of a bitstring. | |
| static int | getBit (int64 bits, int i) |
| Extracts the i'th bit of a bitstring. | |
Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0.
| static int64 geos::precision::CommonBits::signExpBits | ( | int64 | num | ) | [static] |
Computes the bit pattern for the sign and exponent of a double-precision number.
| num |
| static int geos::precision::CommonBits::numCommonMostSigMantissaBits | ( | int64 | num1, | |
| int64 | num2 | |||
| ) | [static] |
This computes the number of common most-significant bits in the mantissas of two double-precision numbers.
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.
| db |
| static int64 geos::precision::CommonBits::zeroLowerBits | ( | int64 | bits, | |
| int | nBits | |||
| ) | [static] |
Zeroes the lower n bits of a bitstring.
| bits | the bitstring to alter | |
| i | the number of bits to zero |
| static int geos::precision::CommonBits::getBit | ( | int64 | bits, | |
| int | i | |||
| ) | [static] |
Extracts the i'th bit of a bitstring.
| bits | the bitstring to extract from | |
| i | the bit to extract |
1.5.4