about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-29 16:40:36 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-03-29 16:40:36 +0530
commitc2d94018c6963b63e95e4666feac976a97816972 (patch)
treec677fbc0ed1634d0b008ceec3b05a5889c834506 /sysdeps/ieee754/dbl-64
parent27ec37f185488a91521ddfbc42d74d8e783a29c9 (diff)
downloadglibc-c2d94018c6963b63e95e4666feac976a97816972.tar.gz
glibc-c2d94018c6963b63e95e4666feac976a97816972.tar.xz
glibc-c2d94018c6963b63e95e4666feac976a97816972.zip
Remove ONE and MONE
Diffstat (limited to 'sysdeps/ieee754/dbl-64')
-rw-r--r--sysdeps/ieee754/dbl-64/e_log.c6
-rw-r--r--sysdeps/ieee754/dbl-64/mpa.h4
-rw-r--r--sysdeps/ieee754/dbl-64/mpatan.c2
-rw-r--r--sysdeps/ieee754/dbl-64/mpatan2.c2
-rw-r--r--sysdeps/ieee754/dbl-64/mptan.c2
-rw-r--r--sysdeps/ieee754/dbl-64/s_atan.c12
-rw-r--r--sysdeps/ieee754/dbl-64/s_tan.c14
7 files changed, 20 insertions, 22 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_log.c b/sysdeps/ieee754/dbl-64/e_log.c
index f8d5a19ad0..f9300f9cef 100644
--- a/sysdeps/ieee754/dbl-64/e_log.c
+++ b/sysdeps/ieee754/dbl-64/e_log.c
@@ -91,7 +91,7 @@ __ieee754_log (double x)
 
   /* Regular values of x */
 
-  w = x - ONE;
+  w = x - 1;
   if (__builtin_expect (ABS (w) > U03, 1))
     goto case_03;
 
@@ -178,7 +178,7 @@ case_03:
   j = (num.i[HIGH_HALF] & 0x000fffff) >> 4;
 
   /* Compute w=(u-ui*vj)/(ui*vj) */
-  p0 = (ONE + (i - 75) * DEL_U) * (ONE + (j - 180) * DEL_V);
+  p0 = (1 + (i - 75) * DEL_U) * (1 + (j - 180) * DEL_V);
   q = u - p0;
   r0 = Iu[i].d * Iv[j].d;
   w = q * r0;
@@ -206,7 +206,7 @@ case_03:
 
   /* Improve the accuracy of r0 */
   EMULV (p0, r0, sa, sb, t1, t2, t3, t4, t5);
-  t = r0 * ((ONE - sa) - sb);
+  t = r0 * ((1 - sa) - sb);
   EADD (r0, t, ra, rb);
 
   /* Compute w */
diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h
index 27bc7dcb5d..ee81f5cbef 100644
--- a/sysdeps/ieee754/dbl-64/mpa.h
+++ b/sysdeps/ieee754/dbl-64/mpa.h
@@ -91,8 +91,6 @@ extern const mp_no mptwo;
 # define  TWO52     0x1.0p52		/* 2^52    */
 #endif
 
-#define  ONE       1.0			/* 1       */
-#define  MONE      -1.0			/* -1      */
 #define  TWO       2.0			/*  2      */
 
 #define  TWO5      TWOPOW (5)		/* 2^5     */
@@ -150,7 +148,7 @@ __pow_mp (int pow, mp_no *y, int p)
       rem += 24;
     }
   /* The sign of any 2^x is always positive.  */
-  Y[0] = ONE;
+  Y[0] = 1;
   Y[1] = 1 << rem;
 
   /* Everything else is 0.  */
diff --git a/sysdeps/ieee754/dbl-64/mpatan.c b/sysdeps/ieee754/dbl-64/mpatan.c
index cc879d8ec4..33c6847d9c 100644
--- a/sysdeps/ieee754/dbl-64/mpatan.c
+++ b/sysdeps/ieee754/dbl-64/mpatan.c
@@ -74,7 +74,7 @@ __mpatan (mp_no *x, mp_no *y, int p)
 	}
     }
   mptwoim1.e = 1;
-  mptwoim1.d[0] = ONE;
+  mptwoim1.d[0] = 1;
 
   /* Reduce x m times.  */
   __sqr (x, &mpsm, p);
diff --git a/sysdeps/ieee754/dbl-64/mpatan2.c b/sysdeps/ieee754/dbl-64/mpatan2.c
index f4aa9dbd06..f66f9eb884 100644
--- a/sysdeps/ieee754/dbl-64/mpatan2.c
+++ b/sysdeps/ieee754/dbl-64/mpatan2.c
@@ -51,7 +51,7 @@ __mpatan2 (mp_no *y, mp_no *x, mp_no *z, int p)
       __dvd (x, y, &mpt1, p);
       __mul (&mpt1, &mpt1, &mpt2, p);
       if (mpt1.d[0] != 0)
-	mpt1.d[0] = ONE;
+	mpt1.d[0] = 1;
       __add (&mpt2, &mpone, &mpt3, p);
       __mpsqrt (&mpt3, &mpt2, p);
       __add (&mpt1, &mpt2, &mpt3, p);
diff --git a/sysdeps/ieee754/dbl-64/mptan.c b/sysdeps/ieee754/dbl-64/mptan.c
index 51b5718e73..281bfca1c3 100644
--- a/sysdeps/ieee754/dbl-64/mptan.c
+++ b/sysdeps/ieee754/dbl-64/mptan.c
@@ -56,7 +56,7 @@ __mptan (double x, mp_no *mpy, int p)
   if (n)
     {
       __dvd (&mpc, &mps, mpy, p);
-      mpy->d[0] *= MONE;
+      mpy->d[0] *= -1;
     }
   /* tan is negative in this area.  */
   else
diff --git a/sysdeps/ieee754/dbl-64/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c
index e3c4be775a..7b6c83ffb6 100644
--- a/sysdeps/ieee754/dbl-64/s_atan.c
+++ b/sysdeps/ieee754/dbl-64/s_atan.c
@@ -179,9 +179,9 @@ atan (double x)
     {
       if (u < D)
 	{			/* C <= u < D */
-	  w = ONE / u;
+	  w = 1 / u;
 	  EMULV (w, u, t1, t2, t3, t4, t5, t6, t7);
-	  ww = w * ((ONE - t1) - t2);
+	  ww = w * ((1 - t1) - t2);
 	  i = (TWO52 + TWO8 * w) - TWO52;
 	  i -= 16;
 	  z = (w - cij[i][0].d) + ww;
@@ -200,7 +200,7 @@ atan (double x)
 	  if ((y = t1 + (yy - u3)) == t1 + (yy + u3))
 	    return __signArctan (x, y);
 
-	  DIV2 (ONE, 0, u, 0, w, ww, t1, t2, t3, t4, t5, t6, t7, t8, t9,
+	  DIV2 (1 , 0, u, 0, w, ww, t1, t2, t3, t4, t5, t6, t7, t8, t9,
 		t10);
 	  t1 = w - hij[i][0].d;
 	  EADD (t1, ww, z, zz);
@@ -230,7 +230,7 @@ atan (double x)
 	{
 	  if (u < E)
 	    {			/* D <= u < E */
-	      w = ONE / u;
+	      w = 1 / u;
 	      v = w * w;
 	      EMULV (w, u, t1, t2, t3, t4, t5, t6, t7);
 
@@ -241,13 +241,13 @@ atan (double x)
 	      yy = d3.d + v * yy;
 	      yy *= w * v;
 
-	      ww = w * ((ONE - t1) - t2);
+	      ww = w * ((1 - t1) - t2);
 	      ESUB (HPI, w, t3, cor);
 	      yy = ((HPI1 + cor) - ww) - yy;
 	      if ((y = t3 + (yy - U4)) == t3 + (yy + U4))
 		return __signArctan (x, y);
 
-	      DIV2 (ONE, 0, u, 0, w, ww, t1, t2, t3, t4, t5, t6, t7, t8,
+	      DIV2 (1 , 0, u, 0, w, ww, t1, t2, t3, t4, t5, t6, t7, t8,
 		    t9, t10);
 	      MUL2 (w, ww, w, ww, v, vv, t1, t2, t3, t4, t5, t6, t7, t8);
 
diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c
index 91fe2b85f7..54f863e544 100644
--- a/sysdeps/ieee754/dbl-64/s_tan.c
+++ b/sysdeps/ieee754/dbl-64/s_tan.c
@@ -154,7 +154,7 @@ tan (double x)
       i = ((int) (mfftnhf.d + TWO8 * w));
       z = w - xfg[i][0].d;
       z2 = z * z;
-      s = (x < 0.0) ? MONE : ONE;
+      s = (x < 0.0) ? -1 : 1;
       pz = z + z * z2 * (e0.d + z2 * e1.d);
       fi = xfg[i][1].d;
       gi = xfg[i][2].d;
@@ -214,13 +214,13 @@ tan (double x)
 	{
 	  ya = -a;
 	  yya = -da;
-	  sy = MONE;
+	  sy = -1;
 	}
       else
 	{
 	  ya = a;
 	  yya = da;
-	  sy = ONE;
+	  sy = 1;
 	}
 
       /* (IV),(V) The case 0.787 < abs(x) <= 25,    abs(y) <= 1e-7 */
@@ -438,13 +438,13 @@ tan (double x)
 	{
 	  ya = -a;
 	  yya = -da;
-	  sy = MONE;
+	  sy = -1;
 	}
       else
 	{
 	  ya = a;
 	  yya = da;
-	  sy = ONE;
+	  sy = 1;
 	}
 
       /* (+++) The case 25 < abs(x) <= 1e8,    abs(y) <= 1e-7 */
@@ -631,13 +631,13 @@ tan (double x)
     {
       ya = -a;
       yya = -da;
-      sy = MONE;
+      sy = -1;
     }
   else
     {
       ya = a;
       yya = da;
-      sy = ONE;
+      sy = 1;
     }
 
   /* (+++) The case 1e8 < abs(x) < 2**1024,    abs(y) <= 1e-7 */