Problem
On macOS Apple Silicon with GCC 15.2, forward returns no Rayleigh-wave dispersion points for a valid layered model.
Dense secular-function scans show that most values become NaN.
Cause
Several floating-point expressions in src/secfunc.cc use unqualified abs():
In this build, the integral overload is selected. For example, a difference of about 0.998 becomes 0, causing rb = 0 and eventually 0 / 0 -> NaN.
src/disp.cc contains a similar call in the adaptive sampling logic.
Suggested fix
Include <cmath> and use std::abs() consistently:
#include <cmath>
wvnom = std::abs(wvno - xkb);
Environment: macOS Apple Silicon, GCC 15.2.0, Eigen 3.4.1.
Problem
On macOS Apple Silicon with GCC 15.2,
forwardreturns no Rayleigh-wave dispersion points for a valid layered model.Dense secular-function scans show that most values become
NaN.Cause
Several floating-point expressions in
src/secfunc.ccuse unqualifiedabs():In this build, the integral overload is selected. For example, a difference of about
0.998becomes0, causingrb = 0and eventually0 / 0 -> NaN.src/disp.cccontains a similar call in the adaptive sampling logic.Suggested fix
Include
<cmath>and usestd::abs()consistently:Environment: macOS Apple Silicon, GCC 15.2.0, Eigen 3.4.1.