0

for example, the user-defined opt.tolerance is 10^-6, the machine eps is 10^-14, according to the code: double tol = opts.tolerance * lapackf77_dlamch("E"); the tol is 10^-20, which is far less than the user need. Is this necessary? I thought once the eps is less than opt.tolerance, then the tol can be set the same as machine eps cause that's enough.

i asked gpt, it told me this result both meets the user need and fully uses the machine eps. but still i feel confused...

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
ingridli
  • 5
  • 2
  • I think the idea is that the eps is a machine constant while the other is a user-provided reference value. If you switch between double and float, the eps changes, reflecting the expected change in accuracy. Conversely, if the scale of your expected results changes, you update the tolerance. For example if your data is in the magnitude 1e100, the final tolerance might be 1e184. If your data is 1e-100, the tolerance should be 1e-116 – Homer512 Jul 31 '23 at 16:05

0 Answers0