This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug math/13932] dbl-64 pow unexpectedly slow for some inputs


https://sourceware.org/bugzilla/show_bug.cgi?id=13932

--- Comment #19 from Vincent Lefèvre <vincent-srcware at vinc17 dot net> ---
(In reply to Wilco from comment #18)
> I don't think pow(0.562500, 1.5) was ever slow.

That's from the bug report:

------------------------------------------------------------
./elf/ld.so --library-path .:math:dlfcn ./a.out
pow(0.562500, 1.5): 0.000982 calls/usec
pow(0.563250, 1.5): 13.574397 calls/usec
ratio:  13828
------------------------------------------------------------

But indeed I cannot reproduce this slowness with 0.562500 on glibc 2.26.

> The case I tested as slow was pow(0.999999999999999889, 1.5).

Indeed this one is very slow (mainly due to the use of 768 bits in the slow
path, which is much more than actually necessary).

> Either way the calculation of the error term was incorrect,

I hadn't checked that.

I suppose that a full rewrite would be needed for a crpow() function. This
could be useful: https://hal.inria.fr/inria-00583988

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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