silence compiler warnings

This commit is contained in:
Axel Kohlmeyer
2025-06-27 23:57:37 -04:00
parent 0c6ce8f23c
commit d168de00db

View File

@ -29,7 +29,7 @@ using namespace EwaldConst;
namespace ElectrodeMath { namespace ElectrodeMath {
static constexpr double ERFCMAX = 5.8; // erfc(ERFCMAX) < machine epsilon(double) static constexpr double ERFCMAX = 5.8; // erfc(ERFCMAX) < machine epsilon(double)
static double safe_erfc(double x) inline double safe_erfc(double x)
{ {
if (x > ERFCMAX) return 0.0; if (x > ERFCMAX) return 0.0;
double expm2 = exp(-x * x); double expm2 = exp(-x * x);
@ -37,7 +37,7 @@ namespace ElectrodeMath {
return t * (A1 + t * (A2 + t * (A3 + t * (A4 + t * A5)))) * expm2; return t * (A1 + t * (A2 + t * (A3 + t * (A4 + t * A5)))) * expm2;
} }
static double safe_derfcr(double x, double &erfc) inline double safe_derfcr(double x, double &erfc)
{ {
if (x > ERFCMAX) { if (x > ERFCMAX) {
erfc = 0.0; erfc = 0.0;