glibc/sysdeps/ieee754
Adhemerval Zanella f165e244e4 math: Simplify and optimize modf implementation
Refactor the generic implementation to use math_config.h definitions,
and add an alternative one if the ABI supports truncf instructions
(gated through math-use-builtins-trunc.h).

The generic implementation generates similar code on x86_64, while
the optimization one for aarch64 (where truncf is supported as a
builtin by through frintz), the improvements are:

reciprocal-throughput           master    patch    difference
workload-0_1                    3.0595   3.0698        -0.34%
workload-1_maxint               5.1747   3.0542        40.98%
workload-maxint_maxfloat        3.4391   3.0349        11.75%
workload-integral               3.2732   3.0293         7.45%

latency                         master    patch    difference
workload-0_1                    3.5267   4.7107       -33.57%
workload-1_maxint               6.9074   4.7282        31.55%
workload-maxint_maxfloat        3.7210   4.7506       -27.67%
workload-integral               3.8634   4.8137       -24.60%

Checked on aarch64-linux-gnu and x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-06-18 15:56:40 -03:00
..
dbl-64 math: Simplify and optimize modf implementation 2025-06-18 15:56:40 -03:00
float128 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
flt-32 math: Simplify and optimize modff implementation 2025-06-18 15:56:00 -03:00
ldbl-64-128 stdio-common: Add scanf long double data for IEEE 754 binary64 format 2025-03-25 09:40:20 +00:00
ldbl-96 stdio-common: Reject real data w/o exponent digits in scanf [BZ #12701] 2025-03-28 12:35:53 +00:00
ldbl-128 ldbl-128: also disable lgammaf128_r builtin when building lgammal_r 2025-05-21 14:11:50 +02:00
ldbl-128ibm stdio-common: Reject real data w/o exponent digits in scanf [BZ #12701] 2025-03-28 12:35:53 +00:00
ldbl-128ibm-compat Implement C23 rootn. 2025-05-14 10:51:46 +00:00
ldbl-opt Fix typos in ldbl-opt makefile 2025-05-20 12:42:54 +02:00
soft-fp Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Makefile
ieee754.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
k_standardl.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-alias-finite.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00