15 #ifndef BORNAGAIN_FIT_TESTENGINE_NUMERIC_H
16 #define BORNAGAIN_FIT_TESTENGINE_NUMERIC_H
Floating-point epsilon, tolerances, almost-equal.
double GetRelativeDifference(double a, double b)
Returns the safe relative difference, which is 2(|a-b|)/(|a|+|b|) except in special cases.
double GetAbsoluteDifference(double a, double b)
Returns the absolute value of the difference between a and b.
double GetLogDifference(double a, double b)
Returns the difference of the logarithm; input values are truncated at the minimum positive value.