diff --git a/src/compute_state.cc b/src/compute_state.cc index 46163f4c0c336876ce7f9ad2eb13b24d4f17e69c..adfb4cd9e99c1dba762756ddc706ebcfa82fc2e5 100644 --- a/src/compute_state.cc +++ b/src/compute_state.cc @@ -17,11 +17,11 @@ class DecayingExponential { typedef Dune::FieldVector<double, 1> VectorType; typedef Dune::FieldMatrix<double, 1, 1> MatrixType; - double operator()(VectorType const &u) const { return exp(-u[0]); } + double operator()(VectorType const &u) const { return std::exp(-u[0]); } void directionalSubDiff(VectorType const &u, VectorType const &v, Interval<double> &D) const { - D[0] = D[1] = v[0] * (-exp(-u[0])); + D[0] = D[1] = v[0] * (-std::exp(-u[0])); } void directionalDomain(VectorType const &, VectorType const &, @@ -43,7 +43,7 @@ double compute_state_update_bisection(double h, double unorm, double L, double compute_state_update_lambert(double h, double unorm, double L, double old_state) { double const rhs = unorm / L - old_state; - return LambertW(0, h * exp(rhs)) - rhs; + return LambertW(0, h * std::exp(rhs)) - rhs; } double compute_state_update_lambert_gsl(double h, double unorm, double L, diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 6bdedb59a54bc3384c1fbfeea1b90d1ef7b5de2a..10a87b7a36a5ccb808871c1575ce97a64a56f63c 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -353,17 +353,17 @@ int main(int argc, char *argv[]) { double ret1 = compute_state_update_bisection(h, unorm, L, s4_old[i][0]); assert(std::abs(1.0 / h * ret1 - (s4_old[i] - unorm / L) / h - - exp(-ret1)) < 1e-10); + std::exp(-ret1)) < 1e-10); double ret2 = compute_state_update_lambert(h, unorm, L, s4_old[i][0]); assert(std::abs(1.0 / h * ret2 - (s4_old[i] - unorm / L) / h - - exp(-ret2)) < 1e-10); + std::exp(-ret2)) < 1e-10); double ret3 = compute_state_update_lambert_gsl(h, unorm, L, s4_old[i][0]); assert(std::abs(1.0 / h * ret3 - (s4_old[i] - unorm / L) / h - - exp(-ret3)) < 1e-10); + std::exp(-ret3)) < 1e-10); assert(std::abs(ret1 - ret2) < 1e-14); assert(std::abs(ret1 - ret3) < 1e-14); @@ -426,17 +426,17 @@ int main(int argc, char *argv[]) { double ret1 = compute_state_update_bisection(h, unorm, L, s5_old[i][0]); assert(std::abs(1.0 / h * ret1 - (s5_old[i] - unorm / L) / h - - exp(-ret1)) < 1e-12); + std::exp(-ret1)) < 1e-12); double ret2 = compute_state_update_lambert(h, unorm, L, s5_old[i][0]); assert(std::abs(1.0 / h * ret2 - (s5_old[i] - unorm / L) / h - - exp(-ret2)) < 1e-12); + std::exp(-ret2)) < 1e-12); double ret3 = compute_state_update_lambert_gsl(h, unorm, L, s4_old[i][0]); assert(std::abs(1.0 / h * ret3 - (s4_old[i] - unorm / L) / h - - exp(-ret3)) < 1e-10); + std::exp(-ret3)) < 1e-10); assert(std::abs(ret1 - ret2) < 1e-14); assert(std::abs(ret1 - ret3) < 1e-14);