[libc-commits] [PATCH] D158812: [libc][math] Implement double precision exp2 function correctly rounded for all rounding modes.

Paul Zimmermann via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Aug 24 23:43:57 PDT 2023


zimmermann6 accepted this revision.
zimmermann6 added a comment.
This revision is now accepted and ready to land.

all CORE-MATH tests do pass, and I get on  an AMD EPYC 7282:

  zimmerma at biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libm.a CORE_MATH_PERF_MODE=rdtsc ./perf.sh exp2
  GNU libc version: 2.37
  GNU libc release: stable
  [####################] 100 %
  Ntrial = 20 ; Min = 27.634 + 0.381 clc/call; Median-Min = 0.332 clc/call; Max = 29.524 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 8.795 + 0.332 clc/call; Median-Min = 0.282 clc/call; Max = 9.361 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 17.916 + 0.145 clc/call; Median-Min = 0.054 clc/call; Max = 18.288 clc/call;

and for the latency:

  zimmerma at biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libm.a CORE_MATH_PERF_MODE=rdtsc PERF_ARGS=--latency ./perf.sh exp2
  GNU libc version: 2.37
  GNU libc release: stable
  [####################] 100 %
  Ntrial = 20 ; Min = 74.091 + 0.367 clc/call; Median-Min = 0.326 clc/call; Max = 74.729 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 31.585 + 0.349 clc/call; Median-Min = 0.318 clc/call; Max = 32.236 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 53.596 + 0.405 clc/call; Median-Min = 0.329 clc/call; Max = 54.656 clc/call;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158812/new/

https://reviews.llvm.org/D158812



More information about the libc-commits mailing list