6ca6e8
commit c5c666f34939d4bbf73aac8b753ab39621ebf33c
6ca6e8
Author: H.J. Lu <hjl.tools@gmail.com>
6ca6e8
Date:   Mon Dec 20 14:37:26 2021 -0800
6ca6e8
6ca6e8
    s_sincosf.h: Change pio4 type to float [BZ #28713]
6ca6e8
    
6ca6e8
    s_cosf.c and s_sinf.c have
6ca6e8
    
6ca6e8
      if (abstop12 (y) < abstop12 (pio4))
6ca6e8
    
6ca6e8
    where abstop12 takes a float argument, but pio4 is static const double.
6ca6e8
    pio4 is used only in calls to abstop12 and never in arithmetic.  Apply
6ca6e8
    
6ca6e8
    -static const double pio4 = 0x1.921FB54442D18p-1;
6ca6e8
    +static const float pio4 = 0x1.921FB6p-1f;
6ca6e8
    
6ca6e8
    to fix:
6ca6e8
    
6ca6e8
    FAIL: math/test-float-cos
6ca6e8
    FAIL: math/test-float-sin
6ca6e8
    FAIL: math/test-float-sincos
6ca6e8
    FAIL: math/test-float32-cos
6ca6e8
    FAIL: math/test-float32-sin
6ca6e8
    FAIL: math/test-float32-sincos
6ca6e8
    
6ca6e8
    when compiling with GCC 12.
6ca6e8
    
6ca6e8
    Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
6ca6e8
    (cherry picked from commit d3e4f5a1014db09ff1c62c6506f92cba469e193d)
6ca6e8
6ca6e8
diff --git a/sysdeps/ieee754/flt-32/s_sincosf.h b/sysdeps/ieee754/flt-32/s_sincosf.h
6ca6e8
index 125ab7f846c463c6..372d8542c2c9a9c7 100644
6ca6e8
--- a/sysdeps/ieee754/flt-32/s_sincosf.h
6ca6e8
+++ b/sysdeps/ieee754/flt-32/s_sincosf.h
6ca6e8
@@ -24,7 +24,7 @@
6ca6e8
 /* 2PI * 2^-64.  */
6ca6e8
 static const double pi63 = 0x1.921FB54442D18p-62;
6ca6e8
 /* PI / 4.  */
6ca6e8
-static const double pio4 = 0x1.921FB54442D18p-1;
6ca6e8
+static const float pio4 = 0x1.921FB6p-1f;
6ca6e8
 
6ca6e8
 /* Polynomial data (the cosine polynomial is negated in the 2nd entry).  */
6ca6e8
 extern const sincos_t __sincosf_table[2] attribute_hidden;