29inline double div(
const double& fNumerator,
const double& fDenominator )
31 return (fDenominator != 0.0) ? (fNumerator / fDenominator) :
49inline double divide(
const double& fNumerator,
const double& fDenominator )
51 if (fDenominator == 0.0)
53 if (std::isfinite( fNumerator) && fNumerator != 0.0)
54 return std::signbit(fNumerator) ? -std::numeric_limits<double>::infinity()
55 : std::numeric_limits<double>::infinity();
56 return std::numeric_limits<double>::quiet_NaN();
58 return fNumerator / fDenominator;
66double power(
const double& fVal1,
const double& fVal2 );
double CreateDoubleError(FormulaError nErr)
CAUTION! The following defines must be in the same namespace as the respective type.
double power(const double &fVal1, const double &fVal2)
Return pow(fVal1,fVal2) with error handling.
double div(const double &fNumerator, const double &fDenominator)
Return fNumerator/fDenominator if fDenominator!=0 else #DIV/0! error coded into double.
double divide(const double &fNumerator, const double &fDenominator)
Return fNumerator/fDenominator if fDenominator!=0 else +-Infinity if fNumerator!=0 or NaN if fNumerat...