aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2018-02-07 12:24:43 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2018-02-07 12:24:43 +0000
commitb7c83ca30ef8e85b6642151d95600a36535f8d97 (patch)
tree96bc33835429ccfe40cd3c257f183b57926ec40c /manual
parent388ff7bd0d57d7061fdd39a2f26f65687e8058da (diff)
downloadglibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.tar
glibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.tar.gz
glibc-b7c83ca30ef8e85b6642151d95600a36535f8d97.tar.bz2
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 'manual')
-rw-r--r--manual/probes.texi17
1 files changed, 0 insertions, 17 deletions
diff --git a/manual/probes.texi b/manual/probes.texi
index 8ab67562d7..e99b7f3cb4 100644
--- a/manual/probes.texi
+++ b/manual/probes.texi
@@ -288,23 +288,6 @@ input that results in multiple precision computation with precision
and @code{$arg4} is the final accurate value.
@end deftp
-@deftp Probe slowlog (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
-This probe is triggered when the @code{log} function is called with an
-input that results in multiple precision computation. Argument
-@var{$arg1} is the precision with which the computation succeeded.
-Argument @var{$arg2} is the input and @var{$arg3} is the computed
-output.
-@end deftp
-
-@deftp Probe slowlog_inexact (int @var{$arg1}, double @var{$arg2}, double @var{$arg3})
-This probe is triggered when the @code{log} function is called with an
-input that results in multiple precision computation and none of the
-multiple precision computations result in an accurate result.
-Argument @var{$arg1} is the maximum precision with which computations
-were performed. Argument @var{$arg2} is the input and @var{$arg3} is
-the computed output.
-@end deftp
-
@deftp Probe slowatan2 (int @var{$arg1}, double @var{$arg2}, double @var{$arg3}, double @var{$arg4})
This probe is triggered when the @code{atan2} function is called with
an input that results in multiple precision computation. Argument