public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] s_sincosf.h: Change pio4 type to float [BZ #28713]
@ 2021-12-20 23:18 H.J. Lu
  2021-12-20 23:18 ` [PATCH 2/2] math: Add X_TLOSSf " H.J. Lu
  2021-12-21  8:52 ` [PATCH 1/2] s_sincosf.h: Change pio4 type to float " Paul Zimmermann
  0 siblings, 2 replies; 15+ messages in thread
From: H.J. Lu @ 2021-12-20 23:18 UTC (permalink / raw)
  To: libc-alpha; +Cc: Joseph Myers

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.  Change
it to float 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.
---
 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..0dadd6374e 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.921FB54442D18p-1;
 
 /* Polynomial data (the cosine polynomial is negated in the 2nd entry).  */
 extern const sincos_t __sincosf_table[2] attribute_hidden;
-- 
2.33.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-12-30 21:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 23:18 [PATCH 1/2] s_sincosf.h: Change pio4 type to float [BZ #28713] H.J. Lu
2021-12-20 23:18 ` [PATCH 2/2] math: Add X_TLOSSf " H.J. Lu
2021-12-21  9:14   ` Paul Zimmermann
2021-12-21 10:13   ` Florian Weimer
2021-12-21 10:34     ` Paul Zimmermann
2021-12-21 17:01       ` H.J. Lu
2021-12-22  9:11         ` Paul Zimmermann
2021-12-22 13:21           ` H.J. Lu
2021-12-22 13:35             ` Paul Zimmermann
2021-12-22 13:50               ` H.J. Lu
2021-12-22 14:03                 ` Florian Weimer
2021-12-22 14:30                   ` H.J. Lu
2021-12-30 21:45           ` Joseph Myers
2021-12-21  8:52 ` [PATCH 1/2] s_sincosf.h: Change pio4 type to float " Paul Zimmermann
2021-12-21 16:58   ` H.J. Lu

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).