This is an archive of the discontinued LLVM Phabricator instance.

[libc][math] Added atanf function.
ClosedPublic

Authored by orex on Aug 29 2022, 3:36 AM.

Details

Summary

Performance by core-math (core-math/glibc 2.31/current llvm-14):
28.879/20.843/20.15

The revision should be applied on top of D132811.

Diff Detail

Event Timeline

orex created this revision.Aug 29 2022, 3:36 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 29 2022, 3:36 AM
orex requested review of this revision.Aug 29 2022, 3:36 AM
orex edited the summary of this revision. (Show Details)Aug 29 2022, 3:37 AM
zimmermann6 accepted this revision.Aug 29 2022, 4:37 AM

ok for me, I get slightly different figures on a AMD EPYC 7282:

zimmerma@biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libllvmlibc.a CORE_MATH_PERF_MODE=rdtsc ./perf.sh atanf
GNU libc version: 2.34
GNU libc release: stable
17.539
31.797
26.903
This revision is now accepted and ready to land.Aug 29 2022, 4:37 AM
lntue added inline comments.Aug 29 2022, 1:36 PM
libc/src/__support/FPUtil/FPBits.h
200

Please add the same function for x86_64/LongDoubleBits

libc/src/math/generic/atanf.cpp
24

Are these constants affected by rounding modes? Also it would be better to define this constant ourselves in some our own header, not relying on the constants defined in math.h.

29

Add comment about its hexadecimal float value.

31

Add comment about its hexadecimal float value.

37

Add comment about its hexadecimal float value.

41

Add comment about its hexadecimal float value.

44

Add comment about its hexadecimal float value.

orex updated this revision to Diff 456757.Aug 30 2022, 12:31 PM

Review fixes.

lntue accepted this revision.Aug 30 2022, 12:44 PM
lntue added inline comments.
libc/src/math/generic/atanf.cpp
13

Update this header file.

This revision was landed with ongoing or failed builds.Aug 30 2022, 1:40 PM
This revision was automatically updated to reflect the committed changes.
orex marked 6 inline comments as done.