ComplexNum
A Typed Complex Number library implements mathematical functions for imaginary numbers.The Complex Class accept integers, floating-point numbers or complex numbers as arguments. Like Other Dart data types Complex class extends Object class
Features
polar coordinates
X
PhaseX
ModulusX
Rectangular
Power and logarithmic functions
X
ExponentialX
Log == LnX
Log with base 10X
Square root
Trigonometric functions
X
SineX
CosineX
TangentX
Inverse SineX
Inverse CosineX
Inverse Tangent
Hyperbolic functions
X
Hyperbolic sineX
Hyperbolic CosineX
Hyperbolic TangentX
Inverse Hyperbolic sineX
Inverse Hyperbolic CosineX
Inverse Hyperbolic Tangent
Classification functions
X
FiniteX
InfiniteX
NaNX
Closeness
Getting started
Initialization
final c1 = Complex(7, 5.5);
final c2 = Complex();
final c3 = Complex(5);
Ouputs
(7+5.5𝑖)
(0+0𝑖)
(5+0𝑖)
And the type is Detected autmaticly
Complex<int, double>
Complex<num, num>
Complex<int, num>
You can also explicitly define the type
final c = Complex<double, double>();
The output would be
(0+0.0𝑖)
Arithmetic operations
final c2 = Complex<int, double>() +
Complex(1, 5) * Complex<int, double>(3, 2) / Complex(10, 10);
Outputs
(0.5+1.2𝑖)
Other Operations
final c1 = Complex(7, 5.5).phase();
final c2 = Complex<int, double>(8, 3).exp();
final c3 = Complex(5, 2).cos();
final c4 = Complex(5, 2).sin();
Outputs
0.6659692373791098
(-2951.1260398524787+420.67281515745424𝑖)
(1.0671926518731156-3.4778844858991573𝑖)
(-3.6076607742131563+1.0288031496599335𝑖)
License
Libraries
- complex_num
- Support for doing something awesome.