sgn

fnF sgn(F)(F x) if (isFloatingPoint!F || isIntegral!F) @safe pure nothrow @nogc

Returns -1 if x < 0, x if x == 0, 1 if

x > 0, and NaN if x==NaN.