Ideas for rewrite of libm-test

Geoff Keating geoffk@ozemail.com.au
Thu Sep 30 19:21:00 GMT 1999


> From: Andreas Jaeger <aj@suse.de>
> Date: 30 Sep 1999 10:53:43 +0200

> I've looked in more details in the rewrite of libm-test and have one
> more question:
> 
>      How should we define the error tolerances?
> 
> Currently libm-test uses absolute errors (the difference between a
> precalculated value and the calculated value).
> 
> But if we want to describe the overall error of a function, we should
> use relative errors like 2^-63.  
> 
> Should we also specify intervals with their errors?

I think what you probably want is to specify errors in units in the
last binary place.  For f(x), a ulp is `nextafter(f(x), 2*f(x)) -
f(x)', assuming f(x) is some reasonable number.  Perfect rounding is a
maximum difference of 0.5 ulp from the true value, many routines
specify 1 ulp as the maximum tolerance.

The advantage of this is that tolerances become nice integers or
fractions, like 1 or 2 or 129/256, and it gives you some idea of how
bad the routine is---if it has low numbers it's good, numbers like 10
or 32 or 1024 indicate some problem.

-- 
Geoffrey Keating <geoffk@cygnus.com>


More information about the Libc-hacker mailing list