[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:
parent
f2b68d8c34
commit
a288d5c6f7
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue