java.lang
Class FloatingDecimal
java.lang.Object
java.lang.FloatingDecimal
- class FloatingDecimal
- extends Object
isExceptional
boolean isExceptional
isNegative
boolean isNegative
decExponent
int decExponent
digits
char[] digits
nDigits
int nDigits
bigIntExp
int bigIntExp
bigIntNBits
int bigIntNBits
mustSetRoundDir
boolean mustSetRoundDir
roundDir
int roundDir
signMask
static final long signMask
- See Also:
- Constant Field Values
expMask
static final long expMask
- See Also:
- Constant Field Values
fractMask
static final long fractMask
- See Also:
- Constant Field Values
expShift
static final int expShift
- See Also:
- Constant Field Values
expBias
static final int expBias
- See Also:
- Constant Field Values
fractHOB
static final long fractHOB
- See Also:
- Constant Field Values
expOne
static final long expOne
- See Also:
- Constant Field Values
maxSmallBinExp
static final int maxSmallBinExp
- See Also:
- Constant Field Values
minSmallBinExp
static final int minSmallBinExp
- See Also:
- Constant Field Values
maxDecimalDigits
static final int maxDecimalDigits
- See Also:
- Constant Field Values
maxDecimalExponent
static final int maxDecimalExponent
- See Also:
- Constant Field Values
minDecimalExponent
static final int minDecimalExponent
- See Also:
- Constant Field Values
bigDecimalExponent
static final int bigDecimalExponent
- See Also:
- Constant Field Values
highbyte
static final long highbyte
- See Also:
- Constant Field Values
highbit
static final long highbit
- See Also:
- Constant Field Values
lowbytes
static final long lowbytes
- See Also:
- Constant Field Values
singleSignMask
static final int singleSignMask
- See Also:
- Constant Field Values
singleExpMask
static final int singleExpMask
- See Also:
- Constant Field Values
singleFractMask
static final int singleFractMask
- See Also:
- Constant Field Values
singleExpShift
static final int singleExpShift
- See Also:
- Constant Field Values
singleFractHOB
static final int singleFractHOB
- See Also:
- Constant Field Values
singleExpBias
static final int singleExpBias
- See Also:
- Constant Field Values
singleMaxDecimalDigits
static final int singleMaxDecimalDigits
- See Also:
- Constant Field Values
singleMaxDecimalExponent
static final int singleMaxDecimalExponent
- See Also:
- Constant Field Values
singleMinDecimalExponent
static final int singleMinDecimalExponent
- See Also:
- Constant Field Values
intDecimalDigits
static final int intDecimalDigits
- See Also:
- Constant Field Values
b5p
private static FDBigInt[] b5p
perThreadBuffer
private static ThreadLocal perThreadBuffer
small10pow
private static final double[] small10pow
singleSmall10pow
private static final float[] singleSmall10pow
big10pow
private static final double[] big10pow
tiny10pow
private static final double[] tiny10pow
maxSmallTen
private static final int maxSmallTen
singleMaxSmallTen
private static final int singleMaxSmallTen
small5pow
private static final int[] small5pow
long5pow
private static final long[] long5pow
n5bits
private static final int[] n5bits
infinity
private static final char[] infinity
notANumber
private static final char[] notANumber
zero
private static final char[] zero
FloatingDecimal
private FloatingDecimal(boolean negSign,
int decExponent,
char[] digits,
int n,
boolean e)
FloatingDecimal
public FloatingDecimal(double d)
FloatingDecimal
public FloatingDecimal(float f)
countBits
private static int countBits(long v)
big5pow
private static FDBigInt big5pow(int p)
multPow52
private static FDBigInt multPow52(FDBigInt v,
int p5,
int p2)
constructPow52
private static FDBigInt constructPow52(int p5,
int p2)
doubleToBigInt
private FDBigInt doubleToBigInt(double dval)
ulp
private static double ulp(double dval,
boolean subtracting)
stickyRound
float stickyRound(double dval)
developLongDigits
private void developLongDigits(int decExponent,
long lvalue,
long insignificant)
roundup
private void roundup()
dtoa
private void dtoa(int binExp,
long fractBits,
int nSignificantBits)
toString
public String toString()
- Description copied from class:
Object
- Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
- Overrides:
toString
in class Object
- Returns:
- a string representation of the object.
toJavaFormatString
public String toJavaFormatString()
getChars
private int getChars(char[] result)
appendTo
void appendTo(StringBuffer buf)
readJavaFormatString
public static FloatingDecimal readJavaFormatString(String in)
throws NumberFormatException
- Throws:
NumberFormatException
doubleValue
public double doubleValue()
floatValue
public float floatValue()