资 源 简 介
This library provides a complex number type that supports arithmetic operations and square root, exponential and logarithm functions.
The internal representation of complex numbers is based on a formal sum of real and imaginary parts, and the implementation of arithmetic operations and functions is based on the correct numerical algorithms.
Two main components of the library are the Complex and the Expression classes.
The Complex class represents a complex number with double-precision real and imaginary parts and defines methods for arithmetic operations (addition, subtraction, multiplication and division), conjugation, square root, logarithm and exponentiation.
```
Complex u = Complex.real( 1.23 ); // 1.23
Complex v = Complex.imaginary( 2.34 ); // 2.34i
Complex w = Complex.cartesian( 3.45, 4.56 ); // 3.45+4.56i
Complex p = Complex.polar( 4.0, Math.PI/6.0 ); // approximately 3.46+2.0i