std.math.approxEqual, 'maxRelDiff' parameter?

ref2401 refactor24 at gmail.com
Sat Dec 15 11:01:22 PST 2012


What does means 'maxRelDiff' parameter?
I looked at the source code of this method and I still didn't get 
it.

return fabs((lhs - rhs) / rhs) <= maxRelDiff
|| maxAbsDiff != 0 && fabs(lhs - rhs) <= maxAbsDiff;

In what cases can I use this parameter?


More information about the Digitalmars-d-learn mailing list