[Bug 218514] [LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Nov 2021 02:39:50 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218514 --- Comment #31 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4f889260c33c163ab28e0e082b4d7e7562d9c647 commit 4f889260c33c163ab28e0e082b4d7e7562d9c647 Author: Steve Kargl <kargl@FreeBSD.org> AuthorDate: 2021-10-31 22:26:20 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-11-01 02:38:19 +0000 sinpi[fl] etc: Fix the ld128 implementations Mark Murray graciously provided access to an aarch64 system to test the ld128 implementations. This patch address * Misuses of copysignl() in sinpil() and tanpil(). * Redo the splitting of argument 'x' into an integer part and remainder. The remainder must satify 0 <= r < 1. * Update the reduction of the integer part to something that can easily be seen as even or odd, e.g., sin(pi*x) = (-1)^n*sin(pi*r) with n <= 2^112 and we an reduce n by subtracting integer powers of 2. * In s_cospil.c, fix typos where 'x' is used where 'ax', the remainder, is required. * In tanpil(), fix the use of an uninitialized variable, ax = fabsl(ax), ax should be x in fabsl(). One item of note, in the limited tested on aarch64, the max ULP for sinpil() and cospil() were less than 1.1 ULP, which is higher that the desired max ULP less than 1. This was traced to the kernel for cosl() in the fundamental interval [0,pi/4]. The coefficients in the minmax polynomial likely need refinement. PR: 218514 MFC after: 1 week lib/msun/ld128/s_cospil.c | 31 +++++++++++++++++-------------- lib/msun/ld128/s_sinpil.c | 29 ++++++++++++++++------------- lib/msun/ld128/s_tanpil.c | 23 +++++++++++++---------- 3 files changed, 46 insertions(+), 37 deletions(-) -- You are receiving this mail because: You are the assignee for the bug.