View source code
Display the source code in std/complex.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module std.complex

This module contains the Complex type, which is used to represent complex numbers, along with related mathematical operations and functions.

Complex will eventually replace the built-in types cfloat, cdouble, creal, ifloat, idouble, and ireal.

Functions

NameDescription
abs(z)
arg(z)
complex(re) Helper function that returns a complex number with the specified real and imaginary parts.
conj(z)
cos(z) Trigonometric functions on complex numbers.
coshisinh(y)
expi(y)
fromPolar(modulus, argument) Constructs a complex number given its absolute value and argument.
sin(z) Trigonometric functions on complex numbers.
sqAbs(z)
sqrt(z)

Structs

NameDescription
Complex A complex number parametrised by a type T, which must be either float, double or real.

Authors

Lars Tandle Kyllingstad, Don Clugston

License

Boost License 1.0