The OpenD Programming Language

sqrt

@safe pure nothrow @nogc
sqrt
(
T
)

Return Value

Type: Complex!T

The square root of z.

Examples

static import core.math;
assert(sqrt(complex(0.0)) == 0.0);
assert(sqrt(complex(1.0L, 0)) == core.math.sqrt(1.0L));
assert(sqrt(complex(-1.0L, 0)) == complex(0, 1.0L));
assert(sqrt(complex(-8.0, -6.0)) == complex(1.0, -3.0));

Meta