On Wed, 2006-05-24 at 17:28 -0500, Lowell Johnson wrote:
> On Wednesday 24 May 2006 01:42 am, [EMAIL PROTECTED] wrote:
> > Hello
> >
> > Instead of computing 2 times fabs(fn), why not storing it in a
> > variable ?
> >
> >        result->val = fn;
> > -      result->err = GSL_DBL_EPSILON*fabs(fn);
> > +      result->err = 2.0*GSL_DBL_EPSILON;
> > +      double factor = fabs(fn);
> > +      if (factor > 1.0)
> > +          result->err *= factor;

Hi. I have not been following this discussion,
but it looks like there is a bug in the above.

   result->err = 2.0*GSL_DBL_EPSILON;
should probably read
   result->err += 2.0*GSL_DBL_EPSILON;

I just happened to notice it out of the corner
of my eye. Hope I'm not completely off base
here.

-- 
Gerard Jungman <[EMAIL PROTECTED]>
Los Alamos National Laboratory

Reply via email to