scalarApproxUlpAndAbs

Determines if two floating point scalars are maxUlps close to each other. If the absolute error is less than maxAbs, the test succeeds however. This is useful when comparing against zero the result of a subtraction.

template scalarApproxUlpAndAbs(T)
pure @safe @nogc nothrow
bool
scalarApproxUlpAndAbs
(
in T a
,
in T b
,
in T maxAbs = 0.0001
,
in ulong maxUlps = 4
)
if (
isFloatingPoint!T
)

Members

Functions

scalarApproxUlpAndAbs
bool scalarApproxUlpAndAbs(T a, T b, T maxAbs, ulong maxUlps)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta