[1D] Make Jacobian atol independent of compiler optimizations

If compiling with -funsafe-math-optimizations, this method of attempting to
calculate the floating point epsilon value would fail.
This commit is contained in:
Ray Speth
2016-04-14 18:55:33 -04:00
parent f2b68d8c34
commit a288d5c6f7

View File

@@ -24,11 +24,7 @@ MultiJac::MultiJac(OneDim& r)
m_elapsed = 0.0;
m_nevals = 0;
m_age = 100000;
doublereal ff = 1.0;
while (1.0 + ff != 1.0) {
ff *= 0.5;
}
m_atol = sqrt(ff);
m_atol = sqrt(std::numeric_limits<double>::epsilon());
m_rtol = 1.0e-5;
}