about summary refs log tree commit diff
path: root/math/Makefile
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2017-09-04 17:55:33 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2017-09-29 17:30:53 +0100
commit4ea49f4c08eeac1a64a5aba8c9033b604afe8b2c (patch)
treea6bae75c1784f4398f6802281ab8ec0034ab2a38 /math/Makefile
parent875c76c7048fe4a8c67c265cdae057cb3ca19f44 (diff)
downloadglibc-4ea49f4c08eeac1a64a5aba8c9033b604afe8b2c.tar.gz
glibc-4ea49f4c08eeac1a64a5aba8c9033b604afe8b2c.tar.xz
glibc-4ea49f4c08eeac1a64a5aba8c9033b604afe8b2c.zip
New generic powf
without wrapper on aarch64:
powf reciprocal-throughput: 4.2x faster
powf latency: 2.6x faster
old worst-case error: 1.11 ulp
new worst-case error: 0.82 ulp
aarch64 .text size: -780 bytes
aarch64 .rodata size: +144 bytes

powf(x,y) is implemented as exp2(y*log2(x)) with the same algorithms
that are used in exp2f and log2f, except that the log2f polynomial is
larger for extra precision and its output (and exp2f input) may be
scaled by a power of 2 (POWF_SCALE) to simplify the argument reduction
step of exp2 (possible when efficient round and convert toint operation
is available).

The special case handling tries to minimize the checks in the hot path.
When the input of exp2_inline is checked, int arithmetics is used as
that was faster on the tested aarch64 cores.

	* math/Makefile (type-float-routines): Add e_powf_log2_data.
	* sysdeps/ieee754/flt-32/e_powf.c: New implementation.
	* sysdeps/ieee754/flt-32/e_powf_log2_data.c: New file.
	* sysdeps/ieee754/flt-32/math_config.h (__powf_log2_data): Define.
	(issignalingf_inline): Likewise.
	(POWF_LOG2_TABLE_BITS): Likewise.
	(POWF_LOG2_POLY_ORDER): Likewise.
	(POWF_SCALE_BITS): Likewise.
	(POWF_SCALE): Likewise.
	* sysdeps/i386/fpu/e_powf_log2_data.c: New file.
	* sysdeps/ia64/fpu/e_powf_log2_data.c: New file.
	* sysdeps/m68k/m680x0/fpu/e_powf_log2_data.c: New file.
Diffstat (limited to 'math/Makefile')
-rw-r--r--math/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/math/Makefile b/math/Makefile
index b4b3101592..6c8aa3e413 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -116,7 +116,7 @@ type-double-routines := branred doasin dosincos halfulp mpa mpatan2	\
 # float support
 type-float-suffix := f
 type-float-routines := k_rem_pio2f math_errf e_exp2f_data e_logf_data	\
-		       e_log2f_data
+		       e_log2f_data e_powf_log2_data
 
 # _Float128 support
 type-float128-suffix := f128