This is an archive of the discontinued LLVM Phabricator instance.

[libc][math] Implement acoshf function correctly rounded to all rounding modes.
ClosedPublic

Authored by lntue on Jan 27 2023, 1:09 PM.

Details

Diff Detail

Event Timeline

lntue created this revision.Jan 27 2023, 1:09 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 27 2023, 1:09 PM
lntue requested review of this revision.Jan 27 2023, 1:09 PM
zimmermann6 requested changes to this revision.Jan 28 2023, 12:00 AM

I cannot apply to main (revision f7c1982), the patch fails.

This revision now requires changes to proceed.Jan 28 2023, 12:00 AM
lntue updated this revision to Diff 493017.Jan 28 2023, 9:59 AM

Sync to HEAD.

I cannot apply to main (revision f7c1982), the patch fails.

I've sync to revision 024115ab1482 and re-upload the patch. Can you try it again? Thanks.

zimmermann6 accepted this revision.Jan 28 2023, 11:54 PM

all exhaustive tests do pass. The performance is a little worse than CORE-MATH and glibc:

zimmerma@biscotte:~/svn/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libllvmlibc.a ./perf.sh acoshf
GNU libc version: 2.36
GNU libc release: stable
[####################] 100 %
Ntrial = 20 ; Min = 17.383 + 0.168 clc/call; Median-Min = 0.004 clc/call; Max = 17.769 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 21.634 + 0.150 clc/call; Median-Min = 0.059 clc/call; Max = 22.014 clc/call;
[####################] 100 %
Ntrial = 20 ; Min = 25.034 + 0.320 clc/call; Median-Min = 0.305 clc/call; Max = 25.602 clc/call;
This revision is now accepted and ready to land.Jan 28 2023, 11:54 PM