java.lang
Class FloatingDecimal

java.lang.Object
  |
  +--java.lang.FloatingDecimal

class FloatingDecimal
extends Object


Field Summary
private static FDBigInt[] b5p
           
private static double[] big10pow
           
(package private) static int bigDecimalExponent
           
(package private)  int bigIntExp
           
(package private)  int bigIntNBits
           
(package private)  int decExponent
           
(package private)  char[] digits
           
(package private) static int expBias
           
(package private) static long expMask
           
(package private) static long expOne
           
(package private) static int expShift
           
(package private) static long fractHOB
           
(package private) static long fractMask
           
(package private) static long highbit
           
(package private) static long highbyte
           
private static char[] infinity
           
(package private) static int intDecimalDigits
           
(package private)  boolean isExceptional
           
(package private)  boolean isNegative
           
private static long[] long5pow
           
(package private) static long lowbytes
           
(package private) static int maxDecimalDigits
           
(package private) static int maxDecimalExponent
           
(package private) static int maxSmallBinExp
           
private static int maxSmallTen
           
(package private) static int minDecimalExponent
           
(package private) static int minSmallBinExp
           
(package private)  boolean mustSetRoundDir
           
private static int[] n5bits
           
(package private)  int nDigits
           
private static char[] notANumber
           
(package private)  int roundDir
           
(package private) static long signMask
           
(package private) static int singleExpBias
           
(package private) static int singleExpMask
           
(package private) static int singleExpShift
           
(package private) static int singleFractHOB
           
(package private) static int singleFractMask
           
(package private) static int singleMaxDecimalDigits
           
(package private) static int singleMaxDecimalExponent
           
private static int singleMaxSmallTen
           
(package private) static int singleMinDecimalExponent
           
(package private) static int singleSignMask
           
private static float[] singleSmall10pow
           
private static double[] small10pow
           
private static int[] small5pow
           
private static double[] tiny10pow
           
private static char[] zero
           
 
Constructor Summary
private FloatingDecimal(boolean negSign, int decExponent, char[] digits, int n, boolean e)
           
  FloatingDecimal(double d)
           
  FloatingDecimal(float f)
           
 
Method Summary
private static FDBigInt big5pow(int p)
           
private static FDBigInt constructPow52(int p5, int p2)
           
private static int countBits(long v)
           
private  void developLongDigits(int decExponent, long lvalue, long insignificant)
           
private  FDBigInt doubleToBigInt(double dval)
           
 double doubleValue()
           
private  void dtoa(int binExp, long fractBits, int nSignificantBits)
           
 float floatValue()
           
private static FDBigInt multPow52(FDBigInt v, int p5, int p2)
           
static FloatingDecimal readJavaFormatString(String in)
           
private  void roundup()
           
(package private)  float stickyRound(double dval)
           
 String toJavaFormatString()
           
 String toString()
          Suppressed: Returns a string representation of the object.
private static double ulp(double dval, boolean subtracting)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

expMask

static final long expMask

fractMask

static final long fractMask

expShift

static final int expShift

expBias

static final int expBias

fractHOB

static final long fractHOB

expOne

static final long expOne

maxSmallBinExp

static final int maxSmallBinExp

minSmallBinExp

static final int minSmallBinExp

maxDecimalDigits

static final int maxDecimalDigits

maxDecimalExponent

static final int maxDecimalExponent

minDecimalExponent

static final int minDecimalExponent

bigDecimalExponent

static final int bigDecimalExponent

highbyte

static final long highbyte

highbit

static final long highbit

lowbytes

static final long lowbytes

singleSignMask

static final int singleSignMask

singleExpMask

static final int singleExpMask

singleFractMask

static final int singleFractMask

singleExpShift

static final int singleExpShift

singleFractHOB

static final int singleFractHOB

singleExpBias

static final int singleExpBias

singleMaxDecimalDigits

static final int singleMaxDecimalDigits

singleMaxDecimalExponent

static final int singleMaxDecimalExponent

singleMinDecimalExponent

static final int singleMinDecimalExponent

intDecimalDigits

static final int intDecimalDigits

b5p

private static FDBigInt[] b5p

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
Constructor Detail

FloatingDecimal

private FloatingDecimal(boolean negSign,
                        int decExponent,
                        char[] digits,
                        int n,
                        boolean e)

FloatingDecimal

public FloatingDecimal(double d)

FloatingDecimal

public FloatingDecimal(float f)
Method Detail

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
Suppressed: 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()

readJavaFormatString

public static FloatingDecimal readJavaFormatString(String in)
                                            throws NumberFormatException
NumberFormatException

doubleValue

public double doubleValue()

floatValue

public float floatValue()


comments?