org.ojalgo
Class BigUtils

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

public final class BigUtils
extends Object

A utility class for BigDecimal math containing:

Author:
apete

Field Summary
static BigDecimal E
           
static BigDecimal HALF
           
static BigDecimal ONE
           
static BigDecimal PI
           
static BigDecimal PREFIX_ATTO
           
static BigDecimal PREFIX_CENTI
           
static BigDecimal PREFIX_DECI
           
static BigDecimal PREFIX_DEKA
           
static BigDecimal PREFIX_EXA
           
static BigDecimal PREFIX_FEMTO
           
static BigDecimal PREFIX_GIGA
           
static BigDecimal PREFIX_HECTO
           
static BigDecimal PREFIX_KILO
           
static BigDecimal PREFIX_MEGA
           
static BigDecimal PREFIX_MICRO
           
static BigDecimal PREFIX_MILLI
           
static BigDecimal PREFIX_NANO
           
static BigDecimal PREFIX_PETA
           
static BigDecimal PREFIX_PICO
           
static BigDecimal PREFIX_TERA
           
static BigDecimal PREFIX_YOCTO
           
static BigDecimal PREFIX_YOTTA
           
static BigDecimal PREFIX_ZEPTO
           
static BigDecimal PREFIX_ZETTA
           
static BigDecimal TWO
           
static BigDecimal VERY_NEGATIVE
           
static BigDecimal VERY_POSITIVE
           
static BigDecimal ZERO
           
 
Method Summary
static BigDecimal acos(Number aNumber)
           
static BigDecimal acosh(Number aNumber)
           
static BigDecimal asin(Number aNumber)
           
static BigDecimal asinh(Number aNumber)
           
static BigDecimal atan(Number aNumber)
           
static BigDecimal atan2(Number aNumberY, Number aNumberX)
           
static BigDecimal atanh(Number aNumber)
           
static BigDecimal cos(Number aNumber)
           
static BigDecimal cosh(Number aNumber)
           
static BigDecimal exp(Number anExponent)
           
static BigDecimal hypot(Number aNumber1, Number aNumber2)
           
static BigDecimal inv(Number aNumber)
           
static BigDecimal log(Number aNumber)
           
static BigDecimal pow(Number aBase, Number anExponent)
           
static BigDecimal powInt(Number aBase, int anExponent)
           
static BigDecimal random()
           
static BigDecimal remainder(Number aDividend, Number aDivisor)
           
static BigDecimal sin(Number aNumber)
           
static BigDecimal sinh(Number aNumber)
           
static BigDecimal sqrt(Number aNumber)
           
static BigDecimal tan(Number aNumber)
           
static BigDecimal tanh(Number aNumber)
           
static BigDecimal toBigDecimal(Number aNumber)
          If the input Number is a BigDecimal it is passed through unaltered.
static BigDecimal toDegrees(Number aNumber)
           
static BigDecimal toRadians(Number aNumber)
           
static BigDecimal ulp(BigDecimal aBigNmbr)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E

public static final BigDecimal E

HALF

public static final BigDecimal HALF

ONE

public static final BigDecimal ONE

PI

public static final BigDecimal PI

PREFIX_ATTO

public static final BigDecimal PREFIX_ATTO

PREFIX_CENTI

public static final BigDecimal PREFIX_CENTI

PREFIX_DECI

public static final BigDecimal PREFIX_DECI

PREFIX_DEKA

public static final BigDecimal PREFIX_DEKA

PREFIX_EXA

public static final BigDecimal PREFIX_EXA

PREFIX_FEMTO

public static final BigDecimal PREFIX_FEMTO

PREFIX_GIGA

public static final BigDecimal PREFIX_GIGA

PREFIX_HECTO

public static final BigDecimal PREFIX_HECTO

PREFIX_KILO

public static final BigDecimal PREFIX_KILO

PREFIX_MEGA

public static final BigDecimal PREFIX_MEGA

PREFIX_MICRO

public static final BigDecimal PREFIX_MICRO

PREFIX_MILLI

public static final BigDecimal PREFIX_MILLI

PREFIX_NANO

public static final BigDecimal PREFIX_NANO

PREFIX_PETA

public static final BigDecimal PREFIX_PETA

PREFIX_PICO

public static final BigDecimal PREFIX_PICO

PREFIX_TERA

public static final BigDecimal PREFIX_TERA

PREFIX_YOCTO

public static final BigDecimal PREFIX_YOCTO

PREFIX_YOTTA

public static final BigDecimal PREFIX_YOTTA

PREFIX_ZEPTO

public static final BigDecimal PREFIX_ZEPTO

PREFIX_ZETTA

public static final BigDecimal PREFIX_ZETTA

TWO

public static final BigDecimal TWO

VERY_NEGATIVE

public static final BigDecimal VERY_NEGATIVE

VERY_POSITIVE

public static final BigDecimal VERY_POSITIVE

ZERO

public static final BigDecimal ZERO
Method Detail

acos

public static BigDecimal acos(Number aNumber)
See Also:
Math.acos(double)

acosh

public static BigDecimal acosh(Number aNumber)
See Also:
PrimitiveUtils.acosh(double)

asin

public static BigDecimal asin(Number aNumber)
See Also:
Math.asin(double)

asinh

public static BigDecimal asinh(Number aNumber)
See Also:
PrimitiveUtils.asinh(double)

atan

public static BigDecimal atan(Number aNumber)
See Also:
Math.atan(double)

atan2

public static BigDecimal atan2(Number aNumberY,
                               Number aNumberX)
See Also:
Math.atan2(double, double)

atanh

public static BigDecimal atanh(Number aNumber)
See Also:
PrimitiveUtils.atanh(double)

cos

public static BigDecimal cos(Number aNumber)
See Also:
Math.cos(double)

cosh

public static BigDecimal cosh(Number aNumber)
See Also:
PrimitiveUtils.cosh(double)

exp

public static BigDecimal exp(Number anExponent)
See Also:
Math.exp(double)

hypot

public static BigDecimal hypot(Number aNumber1,
                               Number aNumber2)
See Also:
PrimitiveUtils.hypot(double, double)

inv

public static BigDecimal inv(Number aNumber)
See Also:
PrimitiveUtils.inv(double)

log

public static BigDecimal log(Number aNumber)
See Also:
Math.log(double)

pow

public static BigDecimal pow(Number aBase,
                             Number anExponent)
See Also:
Math.pow(double, double)

powInt

public static BigDecimal powInt(Number aBase,
                                int anExponent)
See Also:
PrimitiveUtils

random

public static BigDecimal random()
See Also:
Math.random()

remainder

public static BigDecimal remainder(Number aDividend,
                                   Number aDivisor)
See Also:
Math.IEEEremainder(double, double)

sin

public static BigDecimal sin(Number aNumber)
See Also:
Math.sin(double)

sinh

public static BigDecimal sinh(Number aNumber)
See Also:
PrimitiveUtils.sinh(double)

sqrt

public static BigDecimal sqrt(Number aNumber)
See Also:
Math.sqrt(double)

tan

public static BigDecimal tan(Number aNumber)
See Also:
Math.tan(double)

tanh

public static BigDecimal tanh(Number aNumber)
See Also:
PrimitiveUtils.tanh(double)

toBigDecimal

public static BigDecimal toBigDecimal(Number aNumber)
If the input Number is a BigDecimal it is passed through unaltered. Otherwise an equivalent BigDecimal is created.

Parameters:
aNumber - Any Number
Returns:
A corresponding BigDecimal

toDegrees

public static BigDecimal toDegrees(Number aNumber)
See Also:
Math.toDegrees(double)

toRadians

public static BigDecimal toRadians(Number aNumber)
See Also:
Math.toRadians(double)

ulp

public static BigDecimal ulp(BigDecimal aBigNmbr)