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 #13 from Vincent Lefèvre <vincent-srcware at vinc17 dot net> ---
From the bug report, it is __ieee754_pow_sse2 that was used, and if I
understand correctly, the code is in "sysdeps/x86_64/fpu/multiarch/e_pow.c",
which uses "sysdeps/ieee754/dbl-64/e_pow.c". The slow path would imply that
__exp1 returns a non-positive value. __exp1 is defined in
"sysdeps/ieee754/dbl-64/e_exp.c". There, the rounding test is:

      if (res == (res + cor * (1.0 + error + err_1)))

For the example of slow case pow(0.562500, 1.5), the exact result is 0.421875 =
27/64, so that cor should be much smaller than ulp(res) and a positive value
should be returned, which doesn't explain the behavior.

-- 
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]