The easter week-end was the perfect time to polish and release version 2.0.0 of the big-math library.
The class BigComplex
represents complex numbers in the form (a + bi).
It follows the design of BigComplex
with some convenience improvements like overloaded operator methods.
re
im
add(BigComplex)
add(BigComplex, MathContext)
add(BigDecimal)
add(BigDecimal, MathContext)
add(double)
subtract(BigComplex)
subtract(BigComplex, MathContext)
subtract(BigDecimal)
subtract(BigDecimal, MathContext)
subtract(double)
multiply(BigComplex)
multiply(BigComplex, MathContext)
multiply(BigDecimal)
multiply(BigDecimal, MathContext)
multiply(double)
divide(BigComplex)
divide(BigComplex, MathContext)
divide(BigDecimal)
divide(BigDecimal, MathContext)
divide(double)
reciprocal(MathContext)
conjugate()
negate()
abs(MathContext)
angle(MathContext)
absSquare(MathContext)
isReal()
re()
im()
round(MathContext)
hashCode()
equals(Object)
strictEquals(Object)
toString()
valueOf(BigDecimal)
valueOf(double)
valueOf(BigDecimal, BigDecimal)
valueOf(double, double)
valueOfPolar(BigDecimal, BigDecimal, MathContext)
valueOfPolar(double, double, MathContext)
A big difference to BigDecimal
is that BigComplex.equals()
implements the mathematical equality and not the strict technical equality.
This was a difficult decision because it means that BigComplex
behaves slightly different than BigDecimal
but considering that the strange equality of BigDecimal
is a major source of bugs we decided it was worth the slight inconsistency.
If you need the strict equality use BigComplex.strictEquals()
.
The class BigComplexMath
is the equivalent of BigDecimalMath
and contains mathematical functions in the complex domain.
sin(BigComplex, MathContext)
cos(BigComplex, MathContext)
tan(BigComplex, MathContext)
asin(BigComplex, MathContext)
acos(BigComplex, MathContext)
atan(BigComplex, MathContext)
acot(BigComplex, MathContext)
exp(BigComplex, MathContext)
log(BigComplex, MathContext)
pow(BigComplex, long, MathContext)
pow(BigComplex, BigDecimal, MathContext)
pow(BigComplex, BigComplex, MathContext)
sqrt(BigComplex, MathContext)
root(BigComplex, BigDecimal, MathContext)
root(BigComplex, BigComplex, MathContext)