cvs version: make check FAIL

Lowell Johnson ldj00@sio.midco.net
Thu May 25 20:11:00 GMT 2006


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;
>
> Have a nice day.

Sure, that sounds fine to me.  The cost of the extra fabs() is rather 
trivial, but avoiding it will save a few clock cycles.

I've attached a patch to be used in place of the earlier patch.

Thanks.

    Lowell
-- 
Lowell D. Johnson
Linux:  Bringing stability, security, and freedom to home and business
        computing since 1991.  www.linux.org
Free and Open Source Software:  Of the people, by the people, for the 
people.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mathieu.patch
Type: text/x-diff
Size: 3318 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060525/94af2332/attachment.bin>


More information about the Gsl-discuss mailing list