You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original tolerances look arbitrary:
real(sp), parameter :: sptol = 1.2e-06_sp
real(dp), parameter :: dptol = 2.2e-15_dp
but when written using epsilon() they are almost exactly 10x the machine
epsilon for the particular precision kind:
real(sp), parameter :: sptol = 10.06633 * epsilon(1._sp)
real(dp), parameter :: dptol = 9.907919 * epsilon(1._dp)
so I just rounded it to 10:
real(sp), parameter :: sptol = 10 * epsilon(1._sp)
real(dp), parameter :: dptol = 10 * epsilon(1._dp)
which now shows the intent more clearly: the tolerance assumes we lose
one digit of accuracy.
0 commit comments