public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.34/master] s_sincosf.h: Change pio4 type to float [BZ #28713]
Date: Thu, 12 Jan 2023 06:21:57 +0000 (GMT)	[thread overview]
Message-ID: <20230112062157.3B0DD3858C27@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c5c666f34939d4bbf73aac8b753ab39621ebf33c

commit c5c666f34939d4bbf73aac8b753ab39621ebf33c
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Dec 20 14:37:26 2021 -0800

    s_sincosf.h: Change pio4 type to float [BZ #28713]
    
    s_cosf.c and s_sinf.c have
    
      if (abstop12 (y) < abstop12 (pio4))
    
    where abstop12 takes a float argument, but pio4 is static const double.
    pio4 is used only in calls to abstop12 and never in arithmetic.  Apply
    
    -static const double pio4 = 0x1.921FB54442D18p-1;
    +static const float pio4 = 0x1.921FB6p-1f;
    
    to fix:
    
    FAIL: math/test-float-cos
    FAIL: math/test-float-sin
    FAIL: math/test-float-sincos
    FAIL: math/test-float32-cos
    FAIL: math/test-float32-sin
    FAIL: math/test-float32-sincos
    
    when compiling with GCC 12.
    
    Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
    (cherry picked from commit d3e4f5a1014db09ff1c62c6506f92cba469e193d)

Diff:
---
 sysdeps/ieee754/flt-32/s_sincosf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/ieee754/flt-32/s_sincosf.h b/sysdeps/ieee754/flt-32/s_sincosf.h
index 125ab7f846..372d8542c2 100644
--- a/sysdeps/ieee754/flt-32/s_sincosf.h
+++ b/sysdeps/ieee754/flt-32/s_sincosf.h
@@ -24,7 +24,7 @@
 /* 2PI * 2^-64.  */
 static const double pi63 = 0x1.921FB54442D18p-62;
 /* PI / 4.  */
-static const double pio4 = 0x1.921FB54442D18p-1;
+static const float pio4 = 0x1.921FB6p-1f;
 
 /* Polynomial data (the cosine polynomial is negated in the 2nd entry).  */
 extern const sincos_t __sincosf_table[2] attribute_hidden;

                 reply	other threads:[~2023-01-12  6:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230112062157.3B0DD3858C27@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).