about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_sin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_sin.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index b40c47f389..da9ea27d77 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -62,10 +62,10 @@ static const double
 
 void dubsin(double x, double dx, double w[]);
 void docos(double x, double dx, double w[]);
-double mpsin(double x, double dx);
-double mpcos(double x, double dx);
-double mpsin1(double x);
-double mpcos1(double x);
+double __mpsin(double x, double dx);
+double __mpcos(double x, double dx);
+double __mpsin1(double x);
+double __mpcos1(double x);
 static double slow(double x);
 static double slow1(double x);
 static double slow2(double x);
@@ -85,9 +85,15 @@ static double csloww2(double x, double dx, double orig, int n);
 /* it computes the correctly rounded (to nearest) value of sin(x)  */
 /*******************************************************************/
 double sin(double x){
-	double xx,res,t,cor,y,w[2],s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
+	double xx,res,t,cor,y,s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
+#if 0
+	double w[2];
+#endif
 	mynumber u,v;
-	int4 k,m,n,nn;
+	int4 k,m,n;
+#if 0
+	int4 nn;
+#endif
 
 	u.x = x;
 	m = u.i[HIGH_HALF];
@@ -590,7 +596,7 @@ static const double th2_36 = 206158430208.0;   /*    1.5*2**37   */
  else {
    dubsin(ABS(x),0,w);
    if (w[0] == w[0]+1.000000001*w[1]) return (x>0)?w[0]:-w[0];
-   else return (x>0)?mpsin(x,0):-mpsin(-x,0);
+   else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
  }
 }
 /*******************************************************************************/
@@ -627,7 +633,7 @@ static double slow1(double x) {
   else {
     dubsin(ABS(x),0,w);
     if (w[0] == w[0]+1.000000005*w[1]) return (x>0)?w[0]:-w[0];
-    else return (x>0)?mpsin(x,0):-mpsin(-x,0);
+    else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
   }
 }
 /**************************************************************************/
@@ -675,7 +681,7 @@ static double slow2(double x) {
     y2=(y-y1)-hp1.x;
     docos(y1,y2,w);
     if (w[0] == w[0]+1.000000005*w[1]) return (x>0)?w[0]:-w[0];
-    else return (x>0)?mpsin(x,0):-mpsin(-x,0);
+    else return (x>0)?__mpsin(x,0):-__mpsin(-x,0);
   }
 }
 /***************************************************************************/
@@ -722,7 +728,7 @@ static double sloww(double x,double dx, double orig) {
       (a>0)? dubsin(a,da,w) : dubsin(-a,-da,w);
       cor = (w[1]>0)? 1.000000001*w[1] + ABS(orig)*1.1e-40 : 1.000000001*w[1] - ABS(orig)*1.1e-40;
       if (w[0] == w[0]+cor) return (a>0)?w[0]:-w[0];
-      else return mpsin1(orig);
+      else return __mpsin1(orig);
     }
   }
 }
@@ -765,7 +771,7 @@ static double sloww1(double x, double dx, double orig) {
     dubsin(ABS(x),dx,w);
     cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
     if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
-  else  return mpsin1(orig);
+  else  return __mpsin1(orig);
   }
 }
 /***************************************************************************/
@@ -808,7 +814,7 @@ static double sloww2(double x, double dx, double orig, int n) {
    docos(ABS(x),dx,w);
    cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
    if (w[0] == w[0]+cor) return (n&2)?-w[0]:w[0];
-   else  return mpsin1(orig);
+   else  return __mpsin1(orig);
   }
 }
 /***************************************************************************/
@@ -821,8 +827,11 @@ static double sloww2(double x, double dx, double orig, int n) {
 
 static double bsloww(double x,double dx, double orig,int n) {
   static const double th2_36 = 206158430208.0;   /*    1.5*2**37   */
-  double y,x1,x2,xx,r,t,res,cor,w[2],a,da,xn;
+  double y,x1,x2,xx,r,t,res,cor,w[2];
+#if 0
+  double a,da,xn;
   union {int4 i[2]; double x;} v;
+#endif
   x1=(x+th2_36)-th2_36;
   y = aa.x*x1*x1*x1;
   r=x+y;
@@ -838,7 +847,7 @@ static double bsloww(double x,double dx, double orig,int n) {
     (x>0)? dubsin(x,dx,w) : dubsin(-x,-dx,w);
     cor = (w[1]>0)? 1.000000001*w[1] + 1.1e-24 : 1.000000001*w[1] - 1.1e-24;
     if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
-    else return (n&1)?mpcos1(orig):mpsin1(orig);
+    else return (n&1)?__mpcos1(orig):__mpsin1(orig);
   }
 }
 
@@ -881,7 +890,7 @@ mynumber u;
    dubsin(ABS(x),dx,w);
    cor = (w[1]>0)? 1.000000005*w[1]+1.1e-24: 1.000000005*w[1]-1.1e-24;
    if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
-   else  return (n&1)?mpcos1(orig):mpsin1(orig);
+   else  return (n&1)?__mpcos1(orig):__mpsin1(orig);
  }
 }
 
@@ -925,7 +934,7 @@ mynumber u;
    docos(ABS(x),dx,w);
    cor = (w[1]>0)? 1.000000005*w[1]+1.1e-24 : 1.000000005*w[1]-1.1e-24;
    if (w[0] == w[0]+cor) return (n&2)?-w[0]:w[0];
-   else  return (n&1)?mpsin1(orig):mpcos1(orig);
+   else  return (n&1)?__mpsin1(orig):__mpcos1(orig);
  }
 }
 
@@ -965,7 +974,7 @@ static double cslow2(double x) {
     y=ABS(x);
     docos(y,0,w);
     if (w[0] == w[0]+1.000000005*w[1]) return w[0];
-    else return mpcos(x,0);
+    else return __mpcos(x,0);
   }
 }
 
@@ -1014,7 +1023,7 @@ static double csloww(double x,double dx, double orig) {
       (a>0)? dubsin(a,da,w) : dubsin(-a,-da,w);
       cor = (w[1]>0)? 1.000000001*w[1] + ABS(orig)*1.1e-40 : 1.000000001*w[1] - ABS(orig)*1.1e-40;
       if (w[0] == w[0]+cor) return (a>0)?w[0]:-w[0];
-      else return mpcos1(orig);
+      else return __mpcos1(orig);
     }
   }
 }
@@ -1058,7 +1067,7 @@ static double csloww1(double x, double dx, double orig) {
     dubsin(ABS(x),dx,w);
     cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
     if (w[0] == w[0]+cor) return (x>0)?w[0]:-w[0];
-    else  return mpcos1(orig);
+    else  return __mpcos1(orig);
   }
 }
 
@@ -1103,7 +1112,7 @@ static double csloww2(double x, double dx, double orig, int n) {
     docos(ABS(x),dx,w);
     cor = (w[1]>0)? 1.000000005*w[1]+1.1e-30*ABS(orig) : 1.000000005*w[1]-1.1e-30*ABS(orig);
     if (w[0] == w[0]+cor) return (n)?-w[0]:w[0];
-    else  return mpcos1(orig);
+    else  return __mpcos1(orig);
   }
 }