diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2018-02-07 12:24:43 +0000 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2018-02-07 12:24:43 +0000 |
commit | b7c83ca30ef8e85b6642151d95600a36535f8d97 (patch) | |
tree | 96bc33835429ccfe40cd3c257f183b57926ec40c /locale | |
parent | 388ff7bd0d57d7061fdd39a2f26f65687e8058da (diff) | |
download | glibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.tar.gz glibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.tar.xz glibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.zip |
Remove slow paths from log
Remove the slow paths from log. Like several other double precision math functions, log is exactly rounded. This is not required from math functions and causes major overheads as it requires multiple fallbacks using higher precision arithmetic if a result is close to 0.5ULP. Ridiculous slowdowns of up to 100000x have been reported when the highest precision path triggers. Interestingly removing the slow paths makes hardly any difference in practice: the worst case error is still ~0.502ULP, and exp(log(x)) shows identical results before/after on many millions of random cases. All GLIBC math tests pass on AArch64 and x64 with no change in ULP error. A simple test over a few hundred million values shows log is now 18% faster on average. * manual/probes.texi (slowlog): Delete documentation of removed probe. (slowlog_inexact): Likewise * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Remove slow paths. * sysdeps/ieee754/dbl-64/ulog.h: Remove unused declarations.
Diffstat (limited to 'locale')
0 files changed, 0 insertions, 0 deletions