aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-12-20 14:37:26 -0800
committerFlorian Weimer <fweimer@redhat.com>2023-01-11 15:29:37 +0100
commitc5c666f34939d4bbf73aac8b753ab39621ebf33c (patch)
tree47830265a76ab5ee0c44c2c75d8ce3525c8c82ba
parent80b24b86548eee3d96130a48e760d1d6c2e0c587 (diff)
downloadglibc-c5c666f34939d4bbf73aac8b753ab39621ebf33c.tar
glibc-c5c666f34939d4bbf73aac8b753ab39621ebf33c.tar.gz
glibc-c5c666f34939d4bbf73aac8b753ab39621ebf33c.tar.bz2
glibc-c5c666f34939d4bbf73aac8b753ab39621ebf33c.zip
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)
-rw-r--r--sysdeps/ieee754/flt-32/s_sincosf.h2
1 files changed, 1 insertions, 1 deletions
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;