diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp index 6ddc1026b29ca4ee23a45dde458bdbf92a1b348d..fdd73775ea0ba013e6a0c9a6389e7992be3cd737 100644 --- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp +++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp @@ -34,7 +34,7 @@ bool PiecewiseLinearMonotonicCurve::isStrongMonotonic() const { const double gradient0 = getDerivative(_supp_pnts[0]); - if (std::fabs(gradient0) < std::numeric_limits<double>::min()) + if (std::abs(gradient0) < std::numeric_limits<double>::min()) { return false; } diff --git a/MathLib/Nonlinear/Root1D.h b/MathLib/Nonlinear/Root1D.h index edc37751936911a8a877ac39b45fd2495bce48aa..a2e9f8f273b2a3e9492aac0bbd51f6b4e05def69 100644 --- a/MathLib/Nonlinear/Root1D.h +++ b/MathLib/Nonlinear/Root1D.h @@ -112,7 +112,7 @@ public: } //! Returns the size of the current search interval. - double getRange() const { return std::fabs(_a - _b); } + double getRange() const { return std::abs(_a - _b); } private: Function const& _f; diff --git a/MathLib/TemplatePoint.h b/MathLib/TemplatePoint.h index a1831f748699eaea8a325faf3d20773140b9e8a9..a106db21677e48dbb8b3994f9e5b6275be820b81 100644 --- a/MathLib/TemplatePoint.h +++ b/MathLib/TemplatePoint.h @@ -155,8 +155,8 @@ bool lessEq(TemplatePoint<T, DIM> const& a, TemplatePoint<T, DIM> const& b, { auto coordinateIsLargerEps = [&eps](T const u, T const v) -> bool { - return std::fabs(u - v) > eps * std::min(std::fabs(v), std::fabs(u)) && - std::fabs(u - v) > eps; + return std::abs(u - v) > eps * std::min(std::abs(v), std::abs(u)) && + std::abs(u - v) > eps; }; for (std::size_t i = 0; i < DIM; ++i)