std.math.traits
This is a submodule of std.math.
It contains several functions for introspection on numerical values.
Copyright
Copyright The D Language Foundation 2000 - 2011.
tmpl floatTraits
enum RealFormat
Types 1
enumRealFormat
ieeeHalf
ieeeSingle
ieeeDouble
ieeeExtended
ieeeExtended53
ibmExtended
ieeeQuadruple
Functions 11
fn
bool isNaN(X)(X x) if (isFloatingPoint!(X)) @nogc @trusted pure nothrowDetermines if x is NaN. Params: x = a floating point number. Returns: `true` if x is Nan.fn
bool isFinite(X)(X x) @trusted pure nothrow @nogcDetermines if x is finite. Params: x = a floating point number. Returns: `true` if x is finite.fn
bool isInfinity(X)(X x) if (isFloatingPoint!(X)) @nogc @trusted pure nothrowDetermines if x is . Params: x = a floating point number. Returns: `true` if x is .fn
bool isIdentical(real x, real y) @trusted pure nothrow @nogcIs the binary representation of x identical to y?fn
R copysign(R, X)(R to, X from) if (isFloatingPoint!(R) && isFloatingPoint!(X)) @trusted pure nothrow @nogcParams: to = the numeric value to use from = the sign value to use Returns: a value composed of to with from's sign bit.fn
R copysign(R, X)(X to, R from) if (isIntegral!(X) && isFloatingPoint!(R)) @trusted pure nothrow @nogcdittofn
F sgn(F)(F x) if (isFloatingPoint!F || isIntegral!F) @safe pure nothrow @nogcReturns `-1` if x < 0, `x` if x == 0, `1` if x > 0, and if x==.fn
bool isPowerOf2(X)(const X x) if (isNumeric!X) pure @safe nothrow @nogcCheck whether a number is an integer power of two.Templates 1
tmplfloatTraits(T)