diff --git a/include/xsf/cephes/tukey.h b/include/xsf/cephes/tukey.h index 062966df31..140242d174 100644 --- a/include/xsf/cephes/tukey.h +++ b/include/xsf/cephes/tukey.h @@ -21,7 +21,7 @@ namespace cephes { namespace detail { constexpr double tukey_SMALLVAL = 1e-4; - constexpr double tukey_EPS = 1.0e-14; + double tukey_EPS = 1.0e-14; constexpr int tukey_MAXCOUNT = 60; } // namespace detail @@ -44,6 +44,10 @@ namespace cephes { } } + if (x > 1e9){ + detail::tukey_EPS = 1.0e-18; + } + if ((-detail::tukey_SMALLVAL < lmbda) && (lmbda < detail::tukey_SMALLVAL)) { if (x >= 0) { return 1.0 / (1.0 + std::exp(-x));