The OpenD Programming Language

sqrt

@safe pure nothrow @nogc
Complex!T
sqrt
(
T
)
(
Complex!T z
)

Return Value

Type: Complex!T

The square root of z.

Examples

assert(sqrt(complex(0.0)) == 0.0);
assert(sqrt(complex(1.0, 0)) == 1.0);
assert(sqrt(complex(-1.0, 0)) == complex(0, 1.0));
assert(sqrt(complex(-8.0, -6.0)) == complex(1.0, -3.0));

Meta