eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision.
| x | y | feqrel(x, y) |
|---|---|---|
| x | x | real.mant_dig |
| x | ≥= 2*x | 0 |
| x | <= x/2 | 0 |
| NaN | any | 0 |
| any | NaN | 0 |
int feqrel(X)(const X x, const X y) if (isFloatingPoint!(X)) @trusted pure nothrow @nogcTo what precision is x equal to y?
eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision.
| x | y | feqrel(x, y) |
|---|---|---|
| x | x | real.mant_dig |
| x | ≥= 2*x | 0 |
| x | <= x/2 | 0 |
| NaN | any | 0 |
| any | NaN | 0 |