inverseSqrt

SSE approximation of reciprocal square root.

pure nothrow @safe @nogc
T
inverseSqrt
(
T
)
(
T x
)
if (
isFloatingPoint!T
)

Examples

assert (abs(inverseSqrt!float(1) - 1) < 1e-3 );
assert (abs(inverseSqrt!double(1) - 1) < 1e-3 );

Meta