This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cvs version: make check FAIL


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]