(one more)

Index: e_rem_pio2f.c
===================================================================
RCS file: /cvs/src/lib/libm/src/e_rem_pio2f.c,v
retrieving revision 1.3
diff -u -p -r1.3 e_rem_pio2f.c
--- e_rem_pio2f.c       27 Oct 2009 23:59:29 -0000      1.3
+++ e_rem_pio2f.c       26 Sep 2017 22:50:12 -0000
@@ -92,7 +92,7 @@ __ieee754_rem_pio2f(float x, float *y)
 
        GET_FLOAT_WORD(hx,x);
        ix = hx&0x7fffffff;
-       if(ix<=0x3f490fd8)   /* |x| ~<= pi/4 , no need for reduction */
+       if(ix<=0x3f490fdb)   /* |x| ~<= pi/4 , no need for reduction */
            {y[0] = x; y[1] = 0; return 0;}
        if(ix<0x4016cbe4) {  /* |x| < 3pi/4, special case with n=+-1 */
            if(hx>0) { 



On Sep 27 00:45:47, [email protected] wrote:
> The int32_t float word of M_PI_4 is 0x3f490fdb, not 0x3f490fd8.
> 
>       Jan
> 
> On Sep 26 11:57:29, [email protected] wrote:
> > On 2017-09-26 11:41 AM, Jan Stary wrote:
> > >    double 0.785398, high  word 0x3fe921fb
> > >    float  0.785398, float word 0x3f490fdb
> > > 
> > > In case of double, it's exactly 0x3fe921fb.
> > > But why then does s_sinf.c use 0x3f490fd8 instead of 0x3f490fdb?
> > > 
> > Educated guess? Because 8 and upper-case B look alike when you've had too
> > much beer or when you left your reading glasses in the car.
> 
> Index: s_sinf.c
> ===================================================================
> RCS file: /cvs/src/lib/libm/src/s_sinf.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 s_sinf.c
> --- s_sinf.c  12 Sep 2016 19:47:02 -0000      1.4
> +++ s_sinf.c  26 Sep 2017 22:42:26 -0000
> @@ -26,7 +26,7 @@ sinf(float x)
>  
>      /* |x| ~< pi/4 */
>       ix &= 0x7fffffff;
> -     if(ix <= 0x3f490fd8) return __kernel_sinf(x,z,0);
> +     if(ix <= 0x3f490fdb) return __kernel_sinf(x,z,0);
>  
>      /* sin(Inf or NaN) is NaN */
>       else if (ix>=0x7f800000) return x-x;
> Index: s_cosf.c
> ===================================================================
> RCS file: /cvs/src/lib/libm/src/s_cosf.c,v
> retrieving revision 1.5
> diff -u -p -r1.5 s_cosf.c
> --- s_cosf.c  12 Sep 2016 19:47:02 -0000      1.5
> +++ s_cosf.c  26 Sep 2017 22:42:26 -0000
> @@ -26,7 +26,7 @@ cosf(float x)
>  
>      /* |x| ~< pi/4 */
>       ix &= 0x7fffffff;
> -     if(ix <= 0x3f490fd8) return __kernel_cosf(x,z);
> +     if(ix <= 0x3f490fdb) return __kernel_cosf(x,z);
>  
>      /* cos(Inf or NaN) is NaN */
>       else if (ix>=0x7f800000) return x-x;
> 

Reply via email to