Skip to content

Commit

Permalink
bug fix: removed const qualifier from fdapde::log1pexp
Browse files Browse the repository at this point in the history
  • Loading branch information
AlePalu committed Feb 9, 2024
1 parent 8c11a49 commit 8a1cbea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fdaPDE/utils/symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ template <typename T> typename std::enable_if<!std::numeric_limits<T>::is_intege
template <typename Derived> bool is_empty(const Eigen::EigenBase<Derived>& matrix) { return matrix.size() == 0; }

// compute log(1 + exp(x)) in a numerical stable way (see Machler, M. (2012). Accurately computing log(1-exp(-|a|)))
double log1pexp(double x) const {
double log1pexp(double x) {
if (x <= -37.0) return std::exp(x);
if (x <= 18.0) return std::log1p(std::exp(x));
if (x > 33.3) return x;
Expand Down

0 comments on commit 8a1cbea

Please sign in to comment.