The Complex
companion object defines the origin (zero) and the four roots of unity as well as some utility functions.
Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Return the absolute value of that complex number.
Return the absolute value of that complex number.
Value parameters
- c
-
that complex number
Attributes
Create a complex number from a pair of 'Double's.
Create a complex number from a pair of 'Double's.
Value parameters
- ct
-
the tuple form of a complex number
Attributes
Create a complex number from its primary string representation "a+bi". Examples: "2.1+3.2i", "2.1", "3.2i".
Create a complex number from its primary string representation "a+bi". Examples: "2.1+3.2i", "2.1", "3.2i".
Value parameters
- cs
-
the string form of a complex number
Attributes
Create a complex number from its secondary string representation "(a, b)". Examples: "(2.1, 3.2)", "(2.1, 0)", "(0, 3.2)".
Create a complex number from its secondary string representation "(a, b)". Examples: "(2.1, 3.2)", "(2.1, 0)", "(0, 3.2)".
Value parameters
- cs
-
the string form of a complex number
Attributes
Create a complex number from the given polar coordinates.
Create a complex number from the given polar coordinates.
Value parameters
- ang
-
the angle (the angle of the vector above the 're'-axis)
- rad
-
the radius (the length of the vector in the 're-im' plane)
Attributes
Return the complex exponenential function of that complex number.
Return the complex exponenential function of that complex number.
Value parameters
- c
-
that complex number
Attributes
- See also
Return the maximum of two complex number, 'c' and 'd'.
Return the maximum of two complex number, 'c' and 'd'.
Value parameters
- c
-
the first complex number to compare
- d
-
the second complex number to compare
Attributes
Return the minimum of two complex numbers, 'c' and 'd'.
Return the minimum of two complex numbers, 'c' and 'd'.
Value parameters
- c
-
the first complex number to compare
- d
-
the second complex number to compare
Attributes
Return the complex signum (csgn) of a complex number. The values may be -1, 0, or 1.
Return the complex signum (csgn) of a complex number. The values may be -1, 0, or 1.
Value parameters
- c
-
the complex number to obtain the signum of
Attributes
- See also
-
en.wikipedia.org/wiki/Sign_function
Return the square root of that complex number.
Return the square root of that complex number.
Value parameters
- c
-
that complex number
Attributes
- See also
Concrete fields
Negative one (-1) as a Complex number
Negative one (-1) as a Complex number
Attributes
Imaginary one (i) as a Complex number
Imaginary one (i) as a Complex number
Attributes
Negative imaginary one (-i) as a Complex number
Negative imaginary one (-i) as a Complex number