complex 0.7.2 complex: ^0.7.2 copied to clipboard
A representation of a complex number, i.e. a number which has both a real and imaginary part.
A representation of a complex number, i.e. a number which has both a real and an imaginary part.
Translated from The Apache Commons Mathematics Library into Dart.
Implementations of arithmetic operations handle
infinite values according to the rules for
== is an equivalence relation for all instances that have
NaN in either real or imaginary part, e.g. the following are
1 + NaNi
NaN + i
NaN + NaNi
Note that this is in contradiction with the IEEE-754 standard for floating
point numbers (according to which the test
x == x must fail if
const z1 = Complex(1); const z2 = Complex(3, 4); print(z1.abs()); // 1.0 print(z2.abs()); // 5.0 print(z2.conjugate()); // (3.0, -4.0)