From 875c76c7048fe4a8c67c265cdae057cb3ca19f44 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 4 Sep 2017 17:53:47 +0100 Subject: New generic log2f Similar to the new logf: double precision arithmetics and a small lookup table is used. The argument reduction step is the same as in the new logf. without wrapper on aarch64: log2f reciprocal-throughput: 2.3x faster log2f latency: 2.1x faster old worst case error: 1.72 ulp new worst case error: 0.75 ulp aarch64 .text size: -252 bytes aarch64 .rodata size: +244 bytes * math/Makefile (type-float-routines): Add e_log2f_data. * sysdeps/ieee754/flt-32/e_log2f.c: New implementation. * sysdeps/ieee754/flt-32/e_log2f_data.c: New file. * sysdeps/ieee754/flt-32/math_config.h (__log2f_data): Define. (LOG2F_TABLE_BITS, LOG2F_POLY_ORDER): Define. * sysdeps/i386/fpu/e_log2f_data.c: New file. * sysdeps/ia64/fpu/e_log2f_data.c: New file. * sysdeps/m68k/m680x0/fpu/e_log2f_data.c: New file. --- math/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'math') diff --git a/math/Makefile b/math/Makefile index 919fec1..b4b3101 100644 --- a/math/Makefile +++ b/math/Makefile @@ -115,7 +115,8 @@ 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 +type-float-routines := k_rem_pio2f math_errf e_exp2f_data e_logf_data \ + e_log2f_data # _Float128 support type-float128-suffix := f128 -- cgit v1.1