Maven module :un.api : api-math :
Class : un.impl.number.Complex
Extends/Implements : un.api.number.Arithmetic
Subclasses : -

Complex number.
http://en.wikipedia.org/wiki/Complex_number
author  Bertrand COTE


Variables : -
Functions : Complex, Complex, getRe, getIm, abs, argument, conjugate, reciprocal, add, add, subtract, subtract, mult, mult, divide, divide, sqrt, toMatrix, zero, isZero, one, isOne, pow, toString, setEpsilon, resetEpsilon



public void Complex ()

public void Complex (double re, double im)


return  the real part.
public double getRe ()


return  the imaginary part.
public double getIm ()


The absolute value (or the modulus, or magnitude).
return  the absolute value
public double abs ()


The argument (or phase). (Range from -pi to pi)
Indeterminate if this.re and this.im are nulls.
return  the phase
public double argument ()


return  the conjugate of this.
public Complex conjugate ()


Reciprocal = 1/z
return  1/this
public Complex reciprocal ()

public Complex add (Arithmetic other)

public Complex add (double real)

public Complex subtract (Arithmetic other)

public Complex subtract (double real)

public Complex mult (Arithmetic other)

public Complex mult (double real)

public Complex divide (Arithmetic other)

public Complex divide (double real)


calculate the square root with non-negative real part which is called the
principal square root.
return  the square root with non-negative real part(principal square root)
public Complex sqrt ()

public DefaultMatrix toMatrix ()

public Complex zero ()

public boolean isZero ()

public Complex one ()

public boolean isOne ()


{@inheritDoc }
public Complex pow (int n)

public String toString ()


Sets the margin of error on isZero and isOne methods
param  epsilon tolerance
public void setEpsilon (double epsilon)

public void resetEpsilon ()