RFC: removing slow paths in various dbl-64 libm functions
Joseph Myers
joseph@codesourcery.com
Wed Dec 2 00:47:00 GMT 2015
On Tue, 1 Dec 2015, Szabolcs Nagy wrote:
> (low precision libm cannot solve this completely as the general
> bessel functions will take an enormous time depending on the n
> argument:
>
> double yn(int,double);
> int main(){return yn(1e9,1e9);}
>
> will dos gcc when it tries to eval yn at compile-time,
> but for other math functions than yn,jn a low time
> bound can be guaranteed for all inputs.)
A good implementation of cpow (i.e. following glibc's normal accuracy
goals; see bug 14473; ISO C explicitly intends to allow less good
implementations along the existing lines as cexp (y * clog (x))) will
require multiple-precision computation of log and atan2 to over 16000
places in some cases. The time can be bounded, but the bound may not be
that low.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list