help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Origin of 2nd round-off term "dy" in function central_der


From: Brian Gough
Subject: Re: [Help-gsl] Origin of 2nd round-off term "dy" in function central_deriv.c
Date: Tue, 20 Feb 2007 13:03:35 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI)

At Mon, 19 Feb 2007 20:28:09 -0500 (EST),
Rene Girard wrote:
> "I think the dy contribution is trying to capture the rounding error
> from terms like x+h which is O(|x|*DBL_EPSILON)," Is "dy" not rather
> trying to express the round-off due to cancellation caused by taking
> difference like "f(x+h) - f(x-h)" ?  Note that in the expression for
> "dy" we have max between absolute value of r3 and r5 which are
> differences. I do not agree that the expression for "dy" should be
> divided by h^2.

In machine arithmetic the difference f(xp=x+h)-f(xm=x-h) is not
computed with a step of 2*h unless x+h and x-h are exactly
representable.

Due to rounding the step is xp-xh = 2*h + O(eps*x) where eps is the
precision.  I think that is the effect that was trying to be captured
(incorrectly).

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]