Class FieldComplex<T extends CalculusFieldElement<T>>

  • Type Parameters:
    T - the type of the field elements
    All Implemented Interfaces:
    CalculusFieldElement<FieldComplex<T>>, FieldElement<FieldComplex<T>>

    public class FieldComplex<T extends CalculusFieldElement<T>>
    extends Object
    implements CalculusFieldElement<FieldComplex<T>>
    Representation of a Complex number, i.e. a number which has both a real and imaginary part.

    Implementations of arithmetic operations handle NaN and infinite values according to the rules for Double, i.e. equals(java.lang.Object) is an equivalence relation for all instances that have a NaN in either real or imaginary part, e.g. the following are considered equal:

    • 1 + NaNi
    • NaN + i
    • NaN + NaNi

    Note that this contradicts the IEEE-754 standard for floating point numbers (according to which the test x == x must fail if x is NaN). The method equals for primitive double in Precision conforms with IEEE-754 while this class conforms with the standard behavior for Java object types.

    Since:
    2.0