View source code
Display the source code in std/complex.d from which this page was generated on
github.
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.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.complex.expi
Prototype
Complex!(real) expi( real y ) pure nothrow @nogc @trusted;
Parameters
Name | Description |
---|---|
y | A real number. |
Returns
Note
is included here for convenience and for easy migration of code
that uses std.math.expi. Unlike std.math.expi, which uses the
x87 fsincos instruction when possible, this function is no faster
than calculating expi
cos
(y
) and sin
(y
) separately.
Example
assert(expi(1.3e5L) == complex(std.math.cos(1.3e5L), std.math.sin(1.3e5L))); assert(expi(0.0L) == 1.0L); auto z1 = expi(1.234); auto z2 = std.math.expi(1.234); assert(z1.re == z2.re && z1.im == z2.im);
Authors
Lars Tandle Kyllingstad, Don Clugston