cvs version: make check FAIL

Gerard Jungman jungman@lanl.gov
Thu May 25 20:12:00 GMT 2006


On Wed, 2006-05-24 at 17:28 -0500, Lowell Johnson wrote:
> On Wednesday 24 May 2006 01:42 am, picca@synchrotron-soleil.fr 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 <jungman@lanl.gov>
Los Alamos National Laboratory



More information about the Gsl-discuss mailing list