CalcWorldHub
Free online calculator · no signup

Central difference optimal step balance calculator

Choose a central-difference spacing by balancing assumed function-evaluation roundoff against a supplied third-derivative bound.

4,000 tools
Central difference optimal step balance calculator — Relative arithmetic error, Function magnitude scale, Third derivative magnitude bound and calculation method
Central difference optimal step balance calculator: inputs and calculation method.

How to use this calculator

Choose a central-difference spacing by balancing assumed function-evaluation roundoff against a supplied third-derivative bound.

  1. Enter Relative arithmetic error, Function magnitude scale, Third derivative magnitude bound. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Central difference optimal step balance explained

Balanced step0x units
Balanced step: 0.000009 x units in the worked scenario.

A numerical walkthrough

Relative arithmetic error = 2.22044605e-16; Function magnitude scale = 1; Third derivative magnitude bound = 1.

  • Balanced step: 0.000009 x units
  • Estimated absolute derivative error: 3.81368066e-11 f / x
  • Truncation component: 1.27122689e-11 f / x

For binary64 epsilon, function scale 1 and third derivative bound 1, the balanced spacing is about 8.73×10⁻⁶ in the x unit.

The model behind the numbers

E(h)≈εF/h+M₃h²/6; minimization gives h=(3εF/M₃)^(1/3).

Supply absolute function and derivative scales in consistent units. The page minimizes this stated error model; evaluation noise can be substituted for εF when it is known independently.

What to enter

epsilon — Relative arithmetic error
Assumed relative roundoff scale of each function evaluation.
scale — Function magnitude scale
Absolute magnitude bounding the function evaluations.
third — Third derivative magnitude bound
Local bound on |f triple-prime| in function units per x cubed.

Interpreting the result

The estimate assumes a smooth third derivative and centered evaluations. Unknown derivative bounds, cancellation within the function, stochastic noise and representability of x±h need separate checks.

Reading the outputs

Balanced step is in coordinate units. Error and truncation component are absolute derivative errors in function units per coordinate unit.

Frequently asked questions

Should I always use machine epsilon?

Use the actual evaluation-error scale when function values have noise or are computed inaccurately.

Why not choose the smallest possible spacing?

The roundoff component grows as the reciprocal of spacing.

Is this a rigorous guaranteed optimum?

Only for the supplied two-term model; the real function can have different constants or error sources.

How do I use the Central difference optimal step balance calculator?

Enter Relative arithmetic error, Function magnitude scale, Third derivative magnitude bound. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Central difference optimal step balance?

Relative arithmetic error = 2.22044605e-16; Function magnitude scale = 1; Third derivative magnitude bound = 1. Balanced step: 0.000009 x units Estimated absolute derivative error: 3.81368066e-11 f / x Truncation component: 1.27122689e-11 f / x For binary64 epsilon, function scale 1 and third derivative bound 1, the balanced spacing is about 8.73×10⁻⁶ in the x unit.