about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ieee754/dbl-64/atnat.h22
-rw-r--r--sysdeps/ieee754/dbl-64/atnat2.h30
-rw-r--r--sysdeps/ieee754/dbl-64/s_tan.c70
-rw-r--r--sysdeps/ieee754/dbl-64/ulog.h18
-rw-r--r--sysdeps/ieee754/dbl-64/utan.h18
5 files changed, 61 insertions, 97 deletions
diff --git a/sysdeps/ieee754/dbl-64/atnat.h b/sysdeps/ieee754/dbl-64/atnat.h
index 6b8e17821c..5d1eb0cbef 100644
--- a/sysdeps/ieee754/dbl-64/atnat.h
+++ b/sysdeps/ieee754/dbl-64/atnat.h
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -52,8 +52,6 @@
 /**/ f17            = {{0x3fae1e1e, 0x1e1e1e1e} }, /*  1/17     */
 /**/ f19            = {{0xbfaaf286, 0xbca1af28} }, /* -1/19     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /*  0            */
-/**/ one            = {{0x3ff00000, 0x00000000} }, /*  1            */
 /**/ a              = {{0x3e4bb67a, 0x00000000} }, /*  1.290e-8     */
 /**/ b              = {{0x3fb00000, 0x00000000} }, /*  1/16         */
 /**/ c              = {{0x3ff00000, 0x00000000} }, /*  1            */
@@ -77,9 +75,7 @@
 /**/ u9[M]          ={{{0x38c1aa5b, 0x00000000} }, /* 2.658e-35     */
 /**/                  {{0x35c1aa4d, 0x00000000} }, /* 9.443e-50     */
 /**/                  {{0x32c1aa88, 0x00000000} }, /* 3.355e-64     */
-/**/                  {{0x11c1aa56, 0x00000000} }},/* 3.818e-223    */
-/**/ two8           = {{0x40700000, 0x00000000} }, /*  2**8=256     */
-/**/ two52          = {{0x43300000, 0x00000000} }; /*  2**52        */
+/**/                  {{0x11c1aa56, 0x00000000} }};/* 3.818e-223    */
 
 #else
 #ifdef LITTLE_ENDI
@@ -106,8 +102,6 @@
 /**/ f17            = {{0x1e1e1e1e, 0x3fae1e1e} }, /*  1/17     */
 /**/ f19            = {{0xbca1af28, 0xbfaaf286} }, /* -1/19     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /*  0            */
-/**/ one            = {{0x00000000, 0x3ff00000} }, /*  1            */
 /**/ a              = {{0x00000000, 0x3e4bb67a} }, /*  1.290e-8     */
 /**/ b              = {{0x00000000, 0x3fb00000} }, /*  1/16         */
 /**/ c              = {{0x00000000, 0x3ff00000} }, /*  1            */
@@ -131,15 +125,13 @@
 /**/ u9[M]          ={{{0x00000000, 0x38c1aa5b} }, /* 2.658e-35     */
 /**/                  {{0x00000000, 0x35c1aa4d} }, /* 9.443e-50     */
 /**/                  {{0x00000000, 0x32c1aa88} }, /* 3.355e-64     */
-/**/                  {{0x00000000, 0x11c1aa56} }},/* 3.818e-223    */
-/**/ two8           = {{0x00000000, 0x40700000} }, /*  2**8=256     */
-/**/ two52          = {{0x00000000, 0x43300000} }; /*  2**52        */
+/**/                  {{0x00000000, 0x11c1aa56} }};/* 3.818e-223    */
 
 #endif
 #endif
 
-#define  ZERO      zero.d
-#define  ONE       one.d
+#define  ZERO      0.0
+#define  ONE       1.0
 #define  A         a.d
 #define  B         b.d
 #define  C         c.d
@@ -160,7 +152,7 @@
 #define  U6        u6.d
 #define  U7        u7.d
 #define  U8        u8.d
-#define  TWO8      two8.d
-#define  TWO52     two52.d
+#define  TWO8      0x1.0p8	/* 2^8 */
+#define  TWO52     0x1.0p52	/* 2^52 */
 
 #endif
diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h
index fa6aa0d495..ec855e2cfd 100644
--- a/sysdeps/ieee754/dbl-64/atnat2.h
+++ b/sysdeps/ieee754/dbl-64/atnat2.h
@@ -2,7 +2,7 @@
 /*
  * IBM Accurate Mathematical Library
  * Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -57,9 +57,6 @@
 /**/ f17            = {{0x3fae1e1e, 0x1e1e1e1e} }, /*  1/17     */
 /**/ f19            = {{0xbfaaf286, 0xbca1af28} }, /* -1/19     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /*  0            */
-/**/ mzero          = {{0x80000000, 0x00000000} }, /* -0            */
-/**/ one            = {{0x3ff00000, 0x00000000} }, /*  1            */
 /**/ inv16          = {{0x3fb00000, 0x00000000} }, /*  1/16         */
 /**/ opi            = {{0x400921fb, 0x54442d18} }, /*  pi           */
 /**/ opi1           = {{0x3ca1a626, 0x33145c07} }, /*  pi-opi       */
@@ -95,11 +92,8 @@
 /**/                  {{0x23c6eee8, 0x00000000} }, /*  2.465e-136   */
 /**/                  {{0x11c6ed16, 0x00000000} }},/*  4.955e-223   */
 /**/ ue             = {{0x38900e9d, 0x00000000} }, /*  3.02e-36     */
-/**/ two8           = {{0x40700000, 0x00000000} }, /*  2**8=256     */
-/**/ two52          = {{0x43300000, 0x00000000} }, /*  2**52        */
 /**/ two500         = {{0x5f300000, 0x00000000} }, /*  2**500       */
-/**/ twom500        = {{0x20b00000, 0x00000000} }, /*  2**(-500)    */
-/**/ twom1022       = {{0x00100000, 0x00000000} }; /*  2**(-1022)   */
+/**/ twom500        = {{0x20b00000, 0x00000000} }; /*  2**(-500)    */
 
 #else
 #ifdef LITTLE_ENDI
@@ -127,9 +121,6 @@
 /**/ f17            = {{0x1e1e1e1e, 0x3fae1e1e} }, /*  1/17     */
 /**/ f19            = {{0xbca1af28, 0xbfaaf286} }, /* -1/19     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /*  0            */
-/**/ mzero          = {{0x00000000, 0x80000000} }, /* -0            */
-/**/ one            = {{0x00000000, 0x3ff00000} }, /*  1            */
 /**/ inv16          = {{0x00000000, 0x3fb00000} }, /*  1/16         */
 /**/ opi            = {{0x54442d18, 0x400921fb} }, /*  pi           */
 /**/ opi1           = {{0x33145c07, 0x3ca1a626} }, /*  pi-opi       */
@@ -165,20 +156,17 @@
 /**/                  {{0x00000000, 0x23c6eee8} }, /*  2.465e-136   */
 /**/                  {{0x00000000, 0x11c6ed16} }},/*  4.955e-223   */
 /**/ ue             = {{0x00000000, 0x38900e9d} }, /*  3.02e-36     */
-/**/ two8           = {{0x00000000, 0x40700000} }, /*  2**8=256     */
-/**/ two52          = {{0x00000000, 0x43300000} }, /*  2**52        */
 /**/ two500         = {{0x00000000, 0x5f300000} }, /*  2**500       */
-/**/ twom500        = {{0x00000000, 0x20b00000} }, /*  2**(-500)    */
-/**/ twom1022       = {{0x00000000, 0x00100000} }; /*  2**(-1022)   */
+/**/ twom500        = {{0x00000000, 0x20b00000} }; /*  2**(-500)    */
 
 #endif
 #endif
 
-#define  ZERO      zero.d
-#define  MZERO     mzero.d
-#define  ONE       one.d
-#define  TWO8      two8.d
-#define  TWO52     two52.d
-#define  TWOM1022  twom1022.d
+#define  ZERO      0.0		/* 0 */
+#define  MZERO     -0.0		/* 0 with the sign bit set */
+#define  ONE       1.0		/* 1 */
+#define  TWO8      0x1.0p8	/* 2^8 */
+#define  TWO52     0x1.0p52	/* 2^52 */
+#define  TWOM1022  0x1.0p-1022	/* 2^-1022 */
 
 #endif
diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c
index f8507eaa4c..7bc329d793 100644
--- a/sysdeps/ieee754/dbl-64/s_tan.c
+++ b/sysdeps/ieee754/dbl-64/s_tan.c
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * written by International Business Machines Corp.
- * Copyright (C) 2001, 2009, 2011 Free Software Foundation
+ * Copyright (C) 2001-2012 Free Software Foundation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -84,7 +84,7 @@ tan(double x) {
     goto ret;
   }
 
-  w=(x<ZERO) ? -x : x;
+  w=(x<0.0) ? -x : x;
 
   /* (I) The case abs(x) <= 1.259e-8 */
   if (w<=g1.d) { retval = x; goto ret; }
@@ -101,7 +101,7 @@ tan(double x) {
     c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
 	 x2*a27.d))))));
     EMULV(x,x,x2,xx2,t1,t2,t3,t4,t5)
-    ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
+    ADD2(a13.d,aa13.d,c1,0.0,c2,cc2,t1,t2)
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -113,8 +113,8 @@ tan(double x) {
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a3.d ,aa3.d ,c1,cc1,c2,cc2,t1,t2)
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
-    MUL2(x ,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
-    ADD2(x    ,zero.d,c2,cc2,c1,cc1,t1,t2)
+    MUL2(x ,0.0,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
+    ADD2(x    ,0.0,c2,cc2,c1,cc1,t1,t2)
     if ((y=c1+(cc1-u2.d*c1)) == c1+(cc1+u2.d*c1)) { retval = y; goto ret; }
     retval = tanMp(x);
     goto ret;
@@ -125,11 +125,11 @@ tan(double x) {
 
     /* First stage */
     i = ((int) (mfftnhf.d+TWO8*w));
-    z = w-xfg[i][0].d;  z2 = z*z;   s = (x<ZERO) ? MONE : ONE;
+    z = w-xfg[i][0].d;  z2 = z*z;   s = (x<0.0) ? MONE : ONE;
     pz = z+z*z2*(e0.d+z2*e1.d);
     fi = xfg[i][1].d;   gi = xfg[i][2].d;   t2 = pz*(gi+fi)/(gi-pz);
     if ((y=fi+(t2-fi*u3.d))==fi+(t2+fi*u3.d)) { retval = (s*y); goto ret; }
-    t3 = (t2<ZERO) ? -t2 : t2;
+    t3 = (t2<0.0) ? -t2 : t2;
     t4 = fi*ua3.d+t3*ub3.d;
     if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (s*y); goto ret; }
 
@@ -137,16 +137,16 @@ tan(double x) {
     ffi = xfg[i][3].d;
     c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
     EMULV(z,z,z2,zz2,t1,t2,t3,t4,t5)
-    ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
+    ADD2(a5.d,aa5.d,c1,0.0,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
-    MUL2(z ,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
-    ADD2(z ,zero.d,c2,cc2,c1,cc1,t1,t2)
+    MUL2(z ,0.0,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8)
+    ADD2(z ,0.0,c2,cc2,c1,cc1,t1,t2)
 
     ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
     MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
-    SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
+    SUB2(1.0,0.0,c3,cc3,c1,cc1,t1,t2)
     DIV2(c2,cc2,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
 
       if ((y=c3+(cc3-u4.d*c3))==c3+(cc3+u4.d*c3)) { retval = (s*y); goto ret; }
@@ -165,7 +165,7 @@ tan(double x) {
     da = xn*mp3.d;
     a=t1-da;
     da = (t1-a)-da;
-    if (a<ZERO)  {ya=-a;  yya=-da;  sy=MONE;}
+    if (a<0.0)  {ya=-a;  yya=-da;  sy=MONE;}
     else         {ya= a;  yya= da;  sy= ONE;}
 
     /* (IV),(V) The case 0.787 < abs(x) <= 25,    abs(y) <= 1e-7 */
@@ -178,7 +178,7 @@ tan(double x) {
       if (n) {
 	/* First stage -cot */
 	EADD(a,t2,b,db)
-	DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+	DIV2(1.0,0.0,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
 	if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) { retval = (-y); goto ret; } }
       else {
 	/* First stage tan */
@@ -202,7 +202,7 @@ tan(double x) {
       MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
       c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
 	   x2*a27.d))))));
-      ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
+      ADD2(a13.d,aa13.d,c1,0.0,c2,cc2,t1,t2)
       MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
       ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
       MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -219,7 +219,7 @@ tan(double x) {
 
       if (n) {
 	/* Second stage -cot */
-	DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+	DIV2(1.0,0.0,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
 	if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) { retval = (-y); goto ret; } }
       else {
 	/* Second stage tan */
@@ -240,14 +240,14 @@ tan(double x) {
       /* -cot */
       t2 = pz*(fi+gi)/(fi+pz);
       if ((y=gi-(t2-gi*u10.d))==gi-(t2+gi*u10.d)) { retval = (-sy*y); goto ret; }
-      t3 = (t2<ZERO) ? -t2 : t2;
+      t3 = (t2<0.0) ? -t2 : t2;
       t4 = gi*ua10.d+t3*ub10.d;
       if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } }
     else   {
       /* tan */
       t2 = pz*(gi+fi)/(gi-pz);
       if ((y=fi+(t2-fi*u9.d))==fi+(t2+fi*u9.d)) { retval = (sy*y); goto ret; }
-      t3 = (t2<ZERO) ? -t2 : t2;
+      t3 = (t2<0.0) ? -t2 : t2;
       t4 = fi*ua9.d+t3*ub9.d;
       if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } }
 
@@ -256,7 +256,7 @@ tan(double x) {
     EADD(z0,yya,z,zz)
     MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
     c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
-    ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
+    ADD2(a5.d,aa5.d,c1,0.0,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -265,7 +265,7 @@ tan(double x) {
 
     ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
     MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
-    SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
+    SUB2(1.0,0.0,c3,cc3,c1,cc1,t1,t2)
 
     if (n) {
       /* -cot */
@@ -295,7 +295,7 @@ tan(double x) {
     a = t - t1;
     da = ((t-a)-t1)+da;
     EADD(a,da,t1,t2)   a=t1;  da=t2;
-    if (a<ZERO)  {ya=-a;  yya=-da;  sy=MONE;}
+    if (a<0.0)  {ya=-a;  yya=-da;  sy=MONE;}
     else         {ya= a;  yya= da;  sy= ONE;}
 
     /* (+++) The case 25 < abs(x) <= 1e8,    abs(y) <= 1e-7 */
@@ -308,7 +308,7 @@ tan(double x) {
       if (n) {
 	/* First stage -cot */
 	EADD(a,t2,b,db)
-	DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+	DIV2(1.0,0.0,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
 	if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) { retval = (-y); goto ret; } }
       else {
 	/* First stage tan */
@@ -318,7 +318,7 @@ tan(double x) {
       MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
       c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
 	   x2*a27.d))))));
-      ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
+      ADD2(a13.d,aa13.d,c1,0.0,c2,cc2,t1,t2)
       MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
       ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
       MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -335,7 +335,7 @@ tan(double x) {
 
       if (n) {
 	/* Second stage -cot */
-	DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+	DIV2(1.0,0.0,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
 	if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) { retval = (-y); goto ret; } }
       else {
 	/* Second stage tan */
@@ -355,14 +355,14 @@ tan(double x) {
       /* -cot */
       t2 = pz*(fi+gi)/(fi+pz);
       if ((y=gi-(t2-gi*u18.d))==gi-(t2+gi*u18.d)) { retval = (-sy*y); goto ret; }
-      t3 = (t2<ZERO) ? -t2 : t2;
+      t3 = (t2<0.0) ? -t2 : t2;
       t4 = gi*ua18.d+t3*ub18.d;
       if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } }
     else   {
       /* tan */
       t2 = pz*(gi+fi)/(gi-pz);
       if ((y=fi+(t2-fi*u17.d))==fi+(t2+fi*u17.d)) { retval = (sy*y); goto ret; }
-      t3 = (t2<ZERO) ? -t2 : t2;
+      t3 = (t2<0.0) ? -t2 : t2;
       t4 = fi*ua17.d+t3*ub17.d;
       if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } }
 
@@ -371,7 +371,7 @@ tan(double x) {
     EADD(z0,yya,z,zz)
     MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
     c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
-    ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
+    ADD2(a5.d,aa5.d,c1,0.0,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
     MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -380,7 +380,7 @@ tan(double x) {
 
     ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
     MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
-    SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
+    SUB2(1.0,0.0,c3,cc3,c1,cc1,t1,t2)
 
     if (n) {
       /* -cot */
@@ -398,7 +398,7 @@ tan(double x) {
   /* Range reduction by algorithm iii */
   n = (__branred(x,&a,&da)) & 0x00000001;
   EADD(a,da,t1,t2)   a=t1;  da=t2;
-  if (a<ZERO)  {ya=-a;  yya=-da;  sy=MONE;}
+  if (a<0.0)  {ya=-a;  yya=-da;  sy=MONE;}
   else         {ya= a;  yya= da;  sy= ONE;}
 
   /* (+++) The case 1e8 < abs(x) < 2**1024,    abs(y) <= 1e-7 */
@@ -411,7 +411,7 @@ tan(double x) {
     if (n) {
       /* First stage -cot */
       EADD(a,t2,b,db)
-      DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+      DIV2(1.0,0.0,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
       if ((y=c+(dc-u22.d*c))==c+(dc+u22.d*c)) { retval = (-y); goto ret; } }
     else {
       /* First stage tan */
@@ -426,7 +426,7 @@ tan(double x) {
     MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
     c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
 	 x2*a27.d))))));
-    ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
+    ADD2(a13.d,aa13.d,c1,0.0,c2,cc2,t1,t2)
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
     ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
     MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -443,7 +443,7 @@ tan(double x) {
 
     if (n) {
       /* Second stage -cot */
-      DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+      DIV2(1.0,0.0,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
       if ((y=c2+(cc2-u24.d*c2)) == c2+(cc2+u24.d*c2)) { retval = (-y); goto ret; } }
     else {
       /* Second stage tan */
@@ -463,14 +463,14 @@ tan(double x) {
     /* -cot */
     t2 = pz*(fi+gi)/(fi+pz);
     if ((y=gi-(t2-gi*u26.d))==gi-(t2+gi*u26.d)) { retval = (-sy*y); goto ret; }
-    t3 = (t2<ZERO) ? -t2 : t2;
+    t3 = (t2<0.0) ? -t2 : t2;
     t4 = gi*ua26.d+t3*ub26.d;
     if ((y=gi-(t2-t4))==gi-(t2+t4)) { retval = (-sy*y); goto ret; } }
   else   {
     /* tan */
     t2 = pz*(gi+fi)/(gi-pz);
     if ((y=fi+(t2-fi*u25.d))==fi+(t2+fi*u25.d)) { retval = (sy*y); goto ret; }
-    t3 = (t2<ZERO) ? -t2 : t2;
+    t3 = (t2<0.0) ? -t2 : t2;
     t4 = fi*ua25.d+t3*ub25.d;
     if ((y=fi+(t2-t4))==fi+(t2+t4)) { retval = (sy*y); goto ret; } }
 
@@ -479,7 +479,7 @@ tan(double x) {
   EADD(z0,yya,z,zz)
   MUL2(z,zz,z,zz,z2,zz2,t1,t2,t3,t4,t5,t6,t7,t8)
   c1 = z2*(a7.d+z2*(a9.d+z2*a11.d));
-  ADD2(a5.d,aa5.d,c1,zero.d,c2,cc2,t1,t2)
+  ADD2(a5.d,aa5.d,c1,0.0,c2,cc2,t1,t2)
   MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
   ADD2(a3.d,aa3.d,c1,cc1,c2,cc2,t1,t2)
   MUL2(z2,zz2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -488,7 +488,7 @@ tan(double x) {
 
   ADD2(fi ,ffi,c1,cc1,c2,cc2,t1,t2)
   MUL2(fi ,ffi,c1,cc1,c3,cc3,t1,t2,t3,t4,t5,t6,t7,t8)
-  SUB2(one.d,zero.d,c3,cc3,c1,cc1,t1,t2)
+  SUB2(1.0,0.0,c3,cc3,c1,cc1,t1,t2)
 
   if (n) {
     /* -cot */
diff --git a/sysdeps/ieee754/dbl-64/ulog.h b/sysdeps/ieee754/dbl-64/ulog.h
index 0b7d3c25d8..df0691bae3 100644
--- a/sysdeps/ieee754/dbl-64/ulog.h
+++ b/sysdeps/ieee754/dbl-64/ulog.h
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -80,10 +80,6 @@
 /**/ d19            = {{0x3faaf286, 0xbca1af28} }, /*  1/19     */
 /**/ d20            = {{0xbfa99999, 0x9999999a} }, /* -1/20     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
-/**/ one            = {{0x3ff00000, 0x00000000} }, /* 1         */
-/**/ half           = {{0x3fe00000, 0x00000000} }, /* 1/2       */
-/**/ mhalf          = {{0xbfe00000, 0x00000000} }, /* -1/2      */
 /**/ sqrt_2         = {{0x3ff6a09e, 0x667f3bcc} }, /* sqrt(2)   */
 /**/ h1             = {{0x3fd2e000, 0x00000000} }, /* 151/2**9  */
 /**/ h2             = {{0x3f669000, 0x00000000} }, /* 361/2**17 */
@@ -156,10 +152,6 @@
 /**/ d19            = {{0xbca1af28, 0x3faaf286} }, /*  1/19     */
 /**/ d20            = {{0x9999999a, 0xbfa99999} }, /* -1/20     */
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
-/**/ one            = {{0x00000000, 0x3ff00000} }, /* 1         */
-/**/ half           = {{0x00000000, 0x3fe00000} }, /* 1/2       */
-/**/ mhalf          = {{0x00000000, 0xbfe00000} }, /* -1/2      */
 /**/ sqrt_2         = {{0x667f3bcc, 0x3ff6a09e} }, /* sqrt(2)   */
 /**/ h1             = {{0x00000000, 0x3fd2e000} }, /* 151/2**9  */
 /**/ h2             = {{0x00000000, 0x3f669000} }, /* 361/2**17 */
@@ -181,10 +173,10 @@
 #endif
 #endif
 
-#define  ZERO      zero.d
-#define  ONE       one.d
-#define  HALF      half.d
-#define  MHALF     mhalf.d
+#define  ZERO      0.0		/* 0 */
+#define  ONE       1.0		/* 1 */
+#define  HALF      0x1.0p-1	/* 1/2 */
+#define  MHALF     -0x1.0p-1	/* -1/2 */
 #define  SQRT_2    sqrt_2.d
 #define  DEL_U     delu.d
 #define  DEL_V     delv.d
diff --git a/sysdeps/ieee754/dbl-64/utan.h b/sysdeps/ieee754/dbl-64/utan.h
index 2fbe58b16a..03a08d3352 100644
--- a/sysdeps/ieee754/dbl-64/utan.h
+++ b/sysdeps/ieee754/dbl-64/utan.h
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001-2012 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -81,11 +81,7 @@
 /**/ e1             = {{0x3FC11112, 0xE0A6B45F} }, /*    .      */
 
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
-/**/ one            = {{0x3ff00000, 0x00000000} }, /* 1         */
-/**/ mone           = {{0xbff00000, 0x00000000} }, /*-1         */
 /**/ mfftnhf        = {{0xc02f0000, 0x00000000} }, /*-15.5      */
-/**/ two8           = {{0x40700000, 0x00000000} }, /* 256       */
 
 /**/ g1             = {{0x3e4b096c, 0x00000000} }, /* 1.259e-8  */
 /**/ g2             = {{0x3faf212d, 0x00000000} }, /* 0.0608    */
@@ -202,11 +198,7 @@
 /**/ e1             = {{0xE0A6B45F, 0x3FC11112} }, /*    .      */
 
   /* constants    */
-/**/ zero           = {{0x00000000, 0x00000000} }, /* 0         */
-/**/ one            = {{0x00000000, 0x3ff00000} }, /* 1         */
-/**/ mone           = {{0x00000000, 0xbff00000} }, /*-1         */
 /**/ mfftnhf        = {{0x00000000, 0xc02f0000} }, /*-15.5      */
-/**/ two8           = {{0x00000000, 0x40700000} }, /* 256       */
 
 /**/ g1             = {{0x00000000, 0x3e4b096c} }, /* 1.259e-8  */
 /**/ g2             = {{0x00000000, 0x3faf212d} }, /* 0.0608    */
@@ -271,9 +263,9 @@
 #endif
 
 
-#define  ZERO      zero.d
-#define  ONE       one.d
-#define  MONE      mone.d
-#define  TWO8      two8.d
+#define  ZERO      0.0
+#define  ONE       1.0
+#define  MONE      -1.0
+#define  TWO8      0x1.0p8	/* 2^8 */
 
 #endif