public class CommonBits
extends java.lang.Object
Constructor | Description |
---|---|
CommonBits() |
Modifier and Type | Method | Description |
---|---|---|
void |
add(double num) |
|
static int |
getBit(long bits,
int i) |
Extracts the i'th bit of a bitstring.
|
double |
getCommon() |
|
static int |
numCommonMostSigMantissaBits(long num1,
long num2) |
This computes the number of common most-significant bits in the mantissas
of two double-precision numbers.
|
static long |
signExpBits(long num) |
Computes the bit pattern for the sign and exponent of a
double-precision number.
|
java.lang.String |
toString(long bits) |
A representation of the Double bits formatted for easy readability
|
static long |
zeroLowerBits(long bits,
int nBits) |
Zeroes the lower n bits of a bitstring.
|
public static long signExpBits(long num)
num
- public static int numCommonMostSigMantissaBits(long num1, long num2)
num1
- the first numbernum2
- the second numberpublic static long zeroLowerBits(long bits, int nBits)
bits
- the bitstring to alterpublic static int getBit(long bits, int i)
bits
- the bitstring to extract fromi
- the bit to extractpublic void add(double num)
public double getCommon()
public java.lang.String toString(long bits)
Copyright © 2018. All rights reserved.