[libc-commits] [libc] [libc][math] Implement double precision expm1 function correctly rounded for all rounding modes. (PR #67048)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 28 01:26:30 PDT 2023


zimmermann6 wrote:

looks good to me. All core-math tests do pass for all 4 rounding modes, and efficiency is quite good:
```
zimmerma at biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE_MATH_PERF_MODE=rdtsc ./perf.sh expm1
GNU libc version: 2.37
GNU libc release: stable
[####################] 100 %
Ntrial = 20 ; Min = 44.681 + 0.398 clc/call; Median-Min = 0.318 clc/call; Max = 45.533 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 44.593 + 0.350 clc/call; Median-Min = 0.287 clc/call; Max = 46.071 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 29.969 + 0.284 clc/call; Median-Min = 0.317 clc/call; Max = 30.416 clc/call;
zimmerma at biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE_MATH_PERF_MODE=rdtsc PERF_ARGS=--latency ./perf.sh expm1
GNU libc version: 2.37
GNU libc release: stable
[####################] 100 %
Ntrial = 20 ; Min = 73.321 + 0.314 clc/call; Median-Min = 0.302 clc/call; Max = 73.831 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 120.724 + 0.314 clc/call; Median-Min = 0.312 clc/call; Max = 121.278 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 70.920 + 0.449 clc/call; Median-Min = 0.418 clc/call; Max = 71.737 clc/call;
```
(first timings are for core-math, last for llvm)

https://github.com/llvm/llvm-project/pull/67048


More information about the libc-commits mailing list