[Bug 218514] [LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 26 Oct 2021 02:07:01 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218514

--- Comment #21 from commit-hook_at_FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=dce5f3abed7181cc533ca5ed3de44517775e78dd

commit dce5f3abed7181cc533ca5ed3de44517775e78dd
Author:     Steve Kargl <kargl_at_FreeBSD.org>
AuthorDate: 2021-10-25 13:13:52 +0000
Commit:     Konstantin Belousov <kib_at_FreeBSD.org>
CommitDate: 2021-10-25 23:50:20 +0000

    [LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]

    Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle
    trignometric functions cospi, sinpi, and tanpi.  The attached
    patch implements cospi[fl], sinpi[fl], and tanpi[fl].  Limited
    testing on the cospi and sinpi reveal a max ULP less than 0.89;
    while tanpi is more problematic with a max ULP less than 2.01
    in the interval [0,0.5].  The algorithms used in these functions
    are documented in {ks}_cospi.c, {ks}_sinpi.c, and s_tanpi.c.

    Note.  I no longer have access to a system with ld128 and
    adequate support to compile and test the ld128 implementations
    of these functions.  Given the almost complete lack of input from
    others on improvements to libm, I doubt that anyone cares.  If
    someone does care, the ld128 files contain a number of FIXME comments,
    and in particular, while the polynomial coefficients are given
    I did not update the polynomial algorithms to properly use the
    coefficients.

    PR:     218514
    MFC after:      2 weeks

 lib/msun/Makefile               |  14 +++-
 lib/msun/Symbol.map             |  13 +++
 lib/msun/ld128/k_cospil.h (new) |  42 ++++++++++
 lib/msun/ld128/k_sinpil.h (new) |  42 ++++++++++
 lib/msun/ld128/s_cospil.c (new) | 109 +++++++++++++++++++++++++
 lib/msun/ld128/s_sinpil.c (new) | 118 +++++++++++++++++++++++++++
 lib/msun/ld128/s_tanpil.c (new) | 120 +++++++++++++++++++++++++++
 lib/msun/ld80/k_cospil.h (new)  |  42 ++++++++++
 lib/msun/ld80/k_sinpil.h (new)  |  42 ++++++++++
 lib/msun/ld80/s_cospil.c (new)  | 129 +++++++++++++++++++++++++++++
 lib/msun/ld80/s_sinpil.c (new)  | 140 ++++++++++++++++++++++++++++++++
 lib/msun/ld80/s_tanpil.c (new)  | 139 +++++++++++++++++++++++++++++++
 lib/msun/man/cospi.3 (new)      | 111 +++++++++++++++++++++++++
 lib/msun/man/sinpi.3 (new)      | 102 +++++++++++++++++++++++
 lib/msun/man/tanpi.3 (new)      | 106 ++++++++++++++++++++++++
 lib/msun/src/k_cospi.h (new)    |  44 ++++++++++
 lib/msun/src/k_sinpi.h (new)    |  43 ++++++++++
 lib/msun/src/math.h             |   9 ++
 lib/msun/src/s_cospi.c (new)    | 151 ++++++++++++++++++++++++++++++++++
 lib/msun/src/s_cospif.c (new)   | 109 +++++++++++++++++++++++++
 lib/msun/src/s_sinpi.c (new)    | 168 ++++++++++++++++++++++++++++++++++++++
 lib/msun/src/s_sinpif.c (new)   | 122 ++++++++++++++++++++++++++++
 lib/msun/src/s_tanpi.c (new)    | 176 ++++++++++++++++++++++++++++++++++++++++
 lib/msun/src/s_tanpif.c (new)   | 114 ++++++++++++++++++++++++++
 24 files changed, 2203 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Tue Oct 26 2021 - 02:07:01 UTC

Original text of this message