org.ojalgo
Class MathContext

java.lang.Object
  extended by org.ojalgo.MathContext

public class MathContext
extends Object

MathContext Anticipating java.math.MathContext of SDK1.5

Author:
apete

Field Summary
static MathContext DECIMAL128
           
static MathContext DECIMAL32
           
static MathContext DECIMAL64
           
static MathContext UNLIMITED
           
 
Constructor Summary
MathContext(int aPrecision)
           
MathContext(int aPrecision, int aRoundingMode)
           
 
Method Summary
 int getPrecision()
           
 int getRoundingMode()
           
 int getScale()
           
 int getScale(double aNmbr)
           
 int getScale(Number aNmbr)
           
 int getScale(Number aNmbr1, Number aNmbr2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DECIMAL128

public static final MathContext DECIMAL128

DECIMAL32

public static final MathContext DECIMAL32

DECIMAL64

public static final MathContext DECIMAL64

UNLIMITED

public static final MathContext UNLIMITED
Constructor Detail

MathContext

public MathContext(int aPrecision)

MathContext

public MathContext(int aPrecision,
                   int aRoundingMode)
Method Detail

getPrecision

public int getPrecision()

getRoundingMode

public int getRoundingMode()

getScale

public int getScale()
Returns:
Half the precision

getScale

public int getScale(Number aNmbr)

getScale

public int getScale(double aNmbr)

getScale

public int getScale(Number aNmbr1,
                    Number aNmbr2)