SasView / sasview

Code for the SasView application.
BSD 3-Clause "New" or "Revised" License
47 stars 41 forks source link

numerical derivative step size is precision dependent (Trac #563) #695

Open pkienzle opened 5 years ago

pkienzle commented 5 years ago

Need to use eps=sqrt(1e-16) for double precision and sqrt(1e-8) for single precision when computing step size h for numerical differentiation. If the step size is too small, the cancellation error in f(x+h) - f(x) dominates, and if the step size is too large, the numerical derivative error dominates. Bumps mostly assumes double precision.

Migrated from http://trac.sasview.org/ticket/563

{
    "status": "new",
    "changetime": "2016-06-26T17:23:37",
    "_ts": "2016-06-26 17:23:37.000382+00:00",
    "description": "Need to use eps=sqrt(1e-16) for double precision and sqrt(1e-8) for single precision when computing step size h for numerical differentiation.  If the step size is too small, the cancellation error in f(x+h) - f(x) dominates, and if the step size is too large, the numerical derivative error dominates.  Bumps mostly assumes double precision.",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-04-21T22:39:36",
    "component": "SasView",
    "summary": "numerical derivative step size is precision dependent",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView Next Release +1",
    "owner": "",
    "type": "defect"
}
butlerpd commented 5 years ago

Trac update at 2016/06/26 17:23:37:

As agreed on fortnightly call of June 21, am moving all minor priority tickets to next release (+1) given the resources and time available to get this release out.