7.2.44 Math::Complex - Complex Numbers Packageuse Math::Complex; $cnum = new Math::Complex; When you use this module, complex numbers declared as: $cnum = Math::Complex->new(1, 1); can be manipulated with overloaded math operators. The operators: + - * / neg ~ abs cos sin exp sqrt are supported, and return references to new objects. Also, "" (stringify) is available to convert complex numbers to strings. In addition, the methods: Re Im arg
are available. Given a complex number, $cnum = Math::Complex->new($x, $y);
then
|
|