org.ojalgo
Class BigUtils
java.lang.Object
org.ojalgo.BigUtils
public final class BigUtils
- extends Object
A utility class for BigDecimal
math containing:
-
BigDecimal versions of everything in
Math
that makes
sense for BigDecimal and is not already implemented in BigDecimal itself.
-
BigDecimal versions of everything in
PrimitiveUtils
.
-
Useful constants
-
A method that converts a
Number
to a BigDecimal
- Author:
- apete
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
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)