Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/xsf/cephes/tukey.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
Expand Down