[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22738 - in /fsf/trunk/libc: ./ csu/ elf/ hesiod/nss_hesiod/ sysdeps/generic/ sysdeps/ieee754/dbl-64/ sysdeps/ieee754/ldbl-1...



Author: eglibc
Date: Fri Mar 29 00:02:05 2013
New Revision: 22738

Log:
Import glibc-mainline for 2013-03-29

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/csu/libc-start.c
    fsf/trunk/libc/csu/libc-tls.c
    fsf/trunk/libc/elf/dl-iteratephdr.c
    fsf/trunk/libc/elf/dl-support.c
    fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
    fsf/trunk/libc/sysdeps/generic/ldsodefs.h
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_logl.c
    fsf/trunk/libc/sysdeps/mach/hurd/i386/init-first.c
    fsf/trunk/libc/sysdeps/posix/libc_fatal.c
    fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/start.S
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/start.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 29 00:02:05 2013
@@ -1,3 +1,48 @@
+2013-03-28  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* csu/libc-start.c (__libc_start_main) [!SHARED]: If _dl_aux_init
+	didn't do it already, then set _dl_phdr and _dl_phnum based on the
+	magic __ehdr_start linker symbol if it's defined.
+	* sysdeps/mach/hurd/i386/init-first.c (init1) [!SHARED]: Don't set
+	them up here if it was already done.
+
+	* elf/dl-support.c (_dl_phdr): Make pointer to const.
+	(_dl_aux_init): Use const in cast when setting it.
+	* sysdeps/mach/hurd/i386/init-first.c (init1): Remove superfluous cast.
+	* sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr): Update decl.
+	* csu/libc-tls.c (__libc_setup_tls): Make PHDR pointer to const.
+
+	* sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr, _dl_phnum):
+	Declare them here.
+	* elf/dl-iteratephdr.c [!SHARED] (_dl_phdr, _dl_phnum): Not here.
+	* csu/libc-tls.c: Nor here.
+	* sysdeps/mach/hurd/i386/init-first.c (init1): Nor here.
+
+	* sysdeps/posix/libc_fatal.c: Don't include <sys/syslog.h>.
+	(__libc_message): Never call vsyslog.
+
+2013-03-28  Alan Modra  <amodra@xxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/start.S (cfi_startproc, cfi_endproc):
+	Define as empty.
+	* sysdeps/powerpc/powerpc64/start.S (cfi_startproc, cfi_endproc):
+	Likewise.
+
+2013-03-28  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+	[BZ #15214]
+	* sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Fix spurious
+	underflow.
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2013-03-28  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15304]
+	* hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_initgroups_dyn):
+	Don't add gid passed as argument.
+
+	* sysdeps/ieee-754/dbl-64/e_atan2.c: Reformat.
+
 2013-03-27  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	[BZ #15307]

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Mar 29 00:02:05 2013
@@ -12,7 +12,7 @@
   11120, 11561, 12723, 13550, 13889, 13951, 14142, 14176, 14200, 14317,
   14327, 14496, 14812, 14920, 14964, 14981, 14982, 14985, 14994, 14996,
   15003, 15006, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15160,
-  15232, 15234, 15283, 15285, 15287, 15307.
+  15214, 15232, 15234, 15283, 15285, 15287, 15304, 15307.
 
 * Add support for calling C++11 thread_local object destructors on thread
   and program exit.  This needs compiler support for offloading C++11

Modified: fsf/trunk/libc/csu/libc-start.c
==============================================================================
--- fsf/trunk/libc/csu/libc-start.c (original)
+++ fsf/trunk/libc/csu/libc-start.c Fri Mar 29 00:02:05 2013
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -151,7 +152,24 @@
   }
 #  endif
   _dl_aux_init (auxvec);
-# endif
+  if (GL(dl_phdr) == NULL)
+# endif
+    {
+      /* Starting from binutils-2.23, the linker will define the
+         magic symbol __ehdr_start to point to our own ELF header
+         if it is visible in a segment that also includes the phdrs.
+         So we can set up _dl_phdr and _dl_phnum even without any
+         information from auxv.  */
+
+      extern const ElfW(Ehdr) __ehdr_start __attribute__ ((weak));
+      if (&__ehdr_start != NULL)
+        {
+          assert (__ehdr_start.e_phentsize == sizeof *GL(dl_phdr));
+          GL(dl_phdr) = (const void *) &__ehdr_start + __ehdr_start.e_phoff;
+          GL(dl_phnum) = __ehdr_start.e_phnum;
+        }
+    }
+
 # ifdef DL_SYSDEP_OSCHECK
   if (!__libc_multiple_libcs)
     {

Modified: fsf/trunk/libc/csu/libc-tls.c
==============================================================================
--- fsf/trunk/libc/csu/libc-tls.c (original)
+++ fsf/trunk/libc/csu/libc-tls.c Fri Mar 29 00:02:05 2013
@@ -27,10 +27,6 @@
 #ifdef SHARED
  #error makefile bug, this file is for static only
 #endif
-
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
 
 dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS];
 
@@ -118,7 +114,7 @@
   size_t align = 0;
   size_t max_align = tcbalign;
   size_t tcb_offset;
-  ElfW(Phdr) *phdr;
+  const ElfW(Phdr) *phdr;
 
   /* Look through the TLS segment if there is any.  */
   if (_dl_phdr != NULL)

Modified: fsf/trunk/libc/elf/dl-iteratephdr.c
==============================================================================
--- fsf/trunk/libc/elf/dl-iteratephdr.c (original)
+++ fsf/trunk/libc/elf/dl-iteratephdr.c Fri Mar 29 00:02:05 2013
@@ -92,10 +92,6 @@
 
 #else
 
-/* dl-support.c defines these and initializes them early on.  */
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
 int
 dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
 				  size_t size, void *data), void *data)

Modified: fsf/trunk/libc/elf/dl-support.c
==============================================================================
--- fsf/trunk/libc/elf/dl-support.c (original)
+++ fsf/trunk/libc/elf/dl-support.c Fri Mar 29 00:02:05 2013
@@ -126,7 +126,7 @@
 int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID;
 
 ElfW(auxv_t) *_dl_auxv;
-ElfW(Phdr) *_dl_phdr;
+const ElfW(Phdr) *_dl_phdr;
 size_t _dl_phnum;
 uint64_t _dl_hwcap __attribute__ ((nocommon));
 
@@ -205,7 +205,7 @@
 	GLRO(dl_clktck) = av->a_un.a_val;
 	break;
       case AT_PHDR:
-	GL(dl_phdr) = (void *) av->a_un.a_val;
+	GL(dl_phdr) = (const void *) av->a_un.a_val;
 	break;
       case AT_PHNUM:
 	GL(dl_phnum) = av->a_un.a_val;

Modified: fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c
==============================================================================
--- fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c (original)
+++ fsf/trunk/libc/hesiod/nss_hesiod/hesiod-grp.c Fri Mar 29 00:02:05 2013
@@ -189,33 +189,6 @@
     {
       hesiod_end (context);
       return errno == ENOENT ? NSS_STATUS_NOTFOUND : NSS_STATUS_UNAVAIL;
-    }
-
-  if (!internal_gid_in_list (groups, group, *start))
-    {
-      if (__builtin_expect (*start == *size, 0))
-	{
-	  /* Need a bigger buffer.  */
-	  gid_t *newgroups;
-	  long int newsize;
-
-	  if (limit > 0 && *size == limit)
-	    /* We reached the maximum.  */
-	    goto done;
-
-	  if (limit <= 0)
-	    newsize = 2 * *size;
-	  else
-	    newsize = MIN (limit, 2 * *size);
-
-	  newgroups = realloc (groups, newsize * sizeof (*groups));
-	  if (newgroups == NULL)
-	    goto done;
-	  *groupsp = groups = newgroups;
-	  *size = newsize;
-	}
-
-      groups[(*start)++] = group;
     }
 
   save_errno = errno;

Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Fri Mar 29 00:02:05 2013
@@ -601,6 +601,12 @@
 #endif
 #undef EXTERN
 
+#ifndef SHARED
+/* dl-support.c defines these and initializes them early on.  */
+extern const ElfW(Phdr) *_dl_phdr;
+extern size_t _dl_phnum;
+#endif
+
 #ifdef IS_IN_rtld
 /* This is the initial value of GL(dl_error_catch_tsd).
    A non-TLS libpthread will change it.  */

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/e_atan2.c Fri Mar 29 00:02:05 2013
@@ -53,96 +53,171 @@
 /* Assumption: Machine arithmetic operations are performed in           */
 /* round to nearest mode of IEEE 754 standard.                          */
 /************************************************************************/
-static double atan2Mp(double ,double ,const int[]);
+static double atan2Mp (double, double, const int[]);
   /* Fix the sign and return after stage 1 or stage 2 */
-static double signArctan2(double y,double z)
+static double
+signArctan2 (double y, double z)
 {
-  return __copysign(z, y);
+  return __copysign (z, y);
 }
-static double normalized(double ,double,double ,double);
-void __mpatan2(mp_no *,mp_no *,mp_no *,int);
+
+static double normalized (double, double, double, double);
+void __mpatan2 (mp_no *, mp_no *, mp_no *, int);
 
 double
 SECTION
-__ieee754_atan2(double y,double x) {
-
-  int i,de,ux,dx,uy,dy;
-  static const int pr[MM]={6,8,10,20,32};
-  double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t7,t8,
-	 z,zz,cor,s1,ss1,s2,ss2;
+__ieee754_atan2 (double y, double x)
+{
+  int i, de, ux, dx, uy, dy;
+  static const int pr[MM] = { 6, 8, 10, 20, 32 };
+  double ax, ay, u, du, u9, ua, v, vv, dv, t1, t2, t3, t7, t8,
+    z, zz, cor, s1, ss1, s2, ss2;
 #ifndef DLA_FMS
-  double t4,t5,t6;
+  double t4, t5, t6;
 #endif
   number num;
 
-  static const int ep= 59768832,   /*  57*16**5   */
-		   em=-59768832;   /* -57*16**5   */
+  static const int ep = 59768832,	/*  57*16**5   */
+    em = -59768832;		/* -57*16**5   */
 
   /* x=NaN or y=NaN */
-  num.d = x;  ux = num.i[HIGH_HALF];  dx = num.i[LOW_HALF];
-  if   ((ux&0x7ff00000)    ==0x7ff00000) {
-    if (((ux&0x000fffff)|dx)!=0x00000000) return x+x; }
-  num.d = y;  uy = num.i[HIGH_HALF];  dy = num.i[LOW_HALF];
-  if   ((uy&0x7ff00000)    ==0x7ff00000) {
-    if (((uy&0x000fffff)|dy)!=0x00000000) return y+y; }
+  num.d = x;
+  ux = num.i[HIGH_HALF];
+  dx = num.i[LOW_HALF];
+  if ((ux & 0x7ff00000) == 0x7ff00000)
+    {
+      if (((ux & 0x000fffff) | dx) != 0x00000000)
+	return x + x;
+    }
+  num.d = y;
+  uy = num.i[HIGH_HALF];
+  dy = num.i[LOW_HALF];
+  if ((uy & 0x7ff00000) == 0x7ff00000)
+    {
+      if (((uy & 0x000fffff) | dy) != 0x00000000)
+	return y + y;
+    }
 
   /* y=+-0 */
-  if      (uy==0x00000000) {
-    if    (dy==0x00000000) {
-      if  ((ux&0x80000000)==0x00000000)  return ZERO;
-      else                               return opi.d; } }
-  else if (uy==0x80000000) {
-    if    (dy==0x00000000) {
-      if  ((ux&0x80000000)==0x00000000)  return MZERO;
-      else                               return mopi.d;} }
+  if (uy == 0x00000000)
+    {
+      if (dy == 0x00000000)
+	{
+	  if ((ux & 0x80000000) == 0x00000000)
+	    return ZERO;
+	  else
+	    return opi.d;
+	}
+    }
+  else if (uy == 0x80000000)
+    {
+      if (dy == 0x00000000)
+	{
+	  if ((ux & 0x80000000) == 0x00000000)
+	    return MZERO;
+	  else
+	    return mopi.d;
+	}
+    }
 
   /* x=+-0 */
-  if (x==ZERO) {
-    if ((uy&0x80000000)==0x00000000)     return hpi.d;
-    else                                 return mhpi.d; }
+  if (x == ZERO)
+    {
+      if ((uy & 0x80000000) == 0x00000000)
+	return hpi.d;
+      else
+	return mhpi.d;
+    }
 
   /* x=+-INF */
-  if          (ux==0x7ff00000) {
-    if        (dx==0x00000000) {
-      if      (uy==0x7ff00000) {
-	if    (dy==0x00000000)  return qpi.d; }
-      else if (uy==0xfff00000) {
-	if    (dy==0x00000000)  return mqpi.d; }
-      else {
-	if    ((uy&0x80000000)==0x00000000)  return ZERO;
-	else                                 return MZERO; }
-    }
-  }
-  else if     (ux==0xfff00000) {
-    if        (dx==0x00000000) {
-      if      (uy==0x7ff00000) {
-	if    (dy==0x00000000)  return tqpi.d; }
-      else if (uy==0xfff00000) {
-	if    (dy==0x00000000)  return mtqpi.d; }
-      else                     {
-	if    ((uy&0x80000000)==0x00000000)  return opi.d;
-	else                                 return mopi.d; }
-    }
-  }
+  if (ux == 0x7ff00000)
+    {
+      if (dx == 0x00000000)
+	{
+	  if (uy == 0x7ff00000)
+	    {
+	      if (dy == 0x00000000)
+		return qpi.d;
+	    }
+	  else if (uy == 0xfff00000)
+	    {
+	      if (dy == 0x00000000)
+		return mqpi.d;
+	    }
+	  else
+	    {
+	      if ((uy & 0x80000000) == 0x00000000)
+		return ZERO;
+	      else
+		return MZERO;
+	    }
+	}
+    }
+  else if (ux == 0xfff00000)
+    {
+      if (dx == 0x00000000)
+	{
+	  if (uy == 0x7ff00000)
+	    {
+	      if (dy == 0x00000000)
+		return tqpi.d;
+	    }
+	  else if (uy == 0xfff00000)
+	    {
+	      if (dy == 0x00000000)
+		return mtqpi.d;
+	    }
+	  else
+	    {
+	      if ((uy & 0x80000000) == 0x00000000)
+		return opi.d;
+	      else
+		return mopi.d;
+	    }
+	}
+    }
 
   /* y=+-INF */
-  if      (uy==0x7ff00000) {
-    if    (dy==0x00000000)  return hpi.d; }
-  else if (uy==0xfff00000) {
-    if    (dy==0x00000000)  return mhpi.d; }
+  if (uy == 0x7ff00000)
+    {
+      if (dy == 0x00000000)
+	return hpi.d;
+    }
+  else if (uy == 0xfff00000)
+    {
+      if (dy == 0x00000000)
+	return mhpi.d;
+    }
 
   /* either x/y or y/x is very close to zero */
-  ax = (x<ZERO) ? -x : x;    ay = (y<ZERO) ? -y : y;
+  ax = (x < ZERO) ? -x : x;
+  ay = (y < ZERO) ? -y : y;
   de = (uy & 0x7ff00000) - (ux & 0x7ff00000);
-  if      (de>=ep)  { return ((y>ZERO) ? hpi.d : mhpi.d); }
-  else if (de<=em)  {
-    if    (x>ZERO)  {
-      if  ((z=ay/ax)<TWOM1022)  return normalized(ax,ay,y,z);
-      else                      return signArctan2(y,z); }
-    else            { return ((y>ZERO) ? opi.d : mopi.d); } }
+  if (de >= ep)
+    {
+      return ((y > ZERO) ? hpi.d : mhpi.d);
+    }
+  else if (de <= em)
+    {
+      if (x > ZERO)
+	{
+	  if ((z = ay / ax) < TWOM1022)
+	    return normalized (ax, ay, y, z);
+	  else
+	    return signArctan2 (y, z);
+	}
+      else
+	{
+	  return ((y > ZERO) ? opi.d : mopi.d);
+	}
+    }
 
   /* if either x or y is extremely close to zero, scale abs(x), abs(y). */
-  if (ax<twom500.d || ay<twom500.d) { ax*=two500.d;  ay*=two500.d; }
+  if (ax < twom500.d || ay < twom500.d)
+    {
+      ax *= two500.d;
+      ay *= two500.d;
+    }
 
   /* Likewise for large x and y.  */
   if (ax > two500.d || ay > two500.d)
@@ -152,268 +227,377 @@
     }
 
   /* x,y which are neither special nor extreme */
-  if (ay<ax) {
-    u=ay/ax;
-    EMULV(ax,u,v,vv,t1,t2,t3,t4,t5)
-    du=((ay-v)-vv)/ax; }
-  else {
-    u=ax/ay;
-    EMULV(ay,u,v,vv,t1,t2,t3,t4,t5)
-    du=((ax-v)-vv)/ay; }
-
-  if (x>ZERO) {
-
-    /* (i)   x>0, abs(y)< abs(x):  atan(ay/ax) */
-    if (ay<ax) {
-      if (u<inv16.d) {
-	v=u*u;  zz=du+u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
-	if ((z=u+(zz-u1.d*u)) == u+(zz+u1.d*u))  return signArctan2(y,z);
-
-	MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
-	s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
-	ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
-	if ((z=s1+(ss1-u5.d*s1)) == s1+(ss1+u5.d*s1))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-      else {
-	i=(TWO52+TWO8*u)-TWO52;  i-=16;
-	t3=u-cij[i][0].d;
-	EADD(t3,du,v,dv)
-	t1=cij[i][1].d;  t2=cij[i][2].d;
-	zz=v*t2+(dv*t2+v*v*(cij[i][3].d+v*(cij[i][4].d+
-			 v*(cij[i][5].d+v* cij[i][6].d))));
-	if (i<112) {
-	  if (i<48)  u9=u91.d;    /* u < 1/4        */
-	  else       u9=u92.d; }  /* 1/4 <= u < 1/2 */
-	else {
-	  if (i<176) u9=u93.d;    /* 1/2 <= u < 3/4 */
-	  else       u9=u94.d; }  /* 3/4 <= u <= 1  */
-	if ((z=t1+(zz-u9*t1)) == t1+(zz+u9*t1))  return signArctan2(y,z);
-
-	t1=u-hij[i][0].d;
-	EADD(t1,du,v,vv)
-	s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
-	   v*(hij[i][14].d+v* hij[i][15].d))));
-	ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
-	if ((z=s2+(ss2-ub.d*s2)) == s2+(ss2+ub.d*s2))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-    }
-
-    /* (ii)  x>0, abs(x)<=abs(y):  pi/2-atan(ax/ay) */
-    else {
-      if (u<inv16.d) {
-	v=u*u;
-	zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
-	ESUB(hpi.d,u,t2,cor)
-	t3=((hpi1.d+cor)-du)-zz;
-	if ((z=t2+(t3-u2.d)) == t2+(t3+u2.d))  return signArctan2(y,z);
-
-	MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
-	s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
-	ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
-	SUB2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
-	if ((z=s2+(ss2-u6.d)) == s2+(ss2+u6.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-      else {
-	i=(TWO52+TWO8*u)-TWO52;  i-=16;
-	v=(u-cij[i][0].d)+du;
-	zz=hpi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
-				 v*(cij[i][5].d+v* cij[i][6].d))));
-	t1=hpi.d-cij[i][1].d;
-	if (i<112)  ua=ua1.d;  /* w <  1/2 */
-	else        ua=ua2.d;  /* w >= 1/2 */
-	if ((z=t1+(zz-ua)) == t1+(zz+ua))  return signArctan2(y,z);
-
-	t1=u-hij[i][0].d;
-	EADD(t1,du,v,vv)
-	s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
-	   v*(hij[i][14].d+v* hij[i][15].d))));
-	ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
-	SUB2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
-	if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-    }
-  }
-  else {
-
-    /* (iii) x<0, abs(x)< abs(y):  pi/2+atan(ax/ay) */
-    if (ax<ay) {
-      if (u<inv16.d) {
-	v=u*u;
-	zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
-	EADD(hpi.d,u,t2,cor)
-	t3=((hpi1.d+cor)+du)+zz;
-	if ((z=t2+(t3-u3.d)) == t2+(t3+u3.d))  return signArctan2(y,z);
-
-	MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
-	s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
-	ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
-	ADD2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
-	if ((z=s2+(ss2-u7.d)) == s2+(ss2+u7.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-      else {
-	i=(TWO52+TWO8*u)-TWO52;  i-=16;
-	v=(u-cij[i][0].d)+du;
-	zz=hpi1.d+v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
-				 v*(cij[i][5].d+v* cij[i][6].d))));
-	t1=hpi.d+cij[i][1].d;
-	if (i<112)  ua=ua1.d;  /* w <  1/2 */
-	else        ua=ua2.d;  /* w >= 1/2 */
-	if ((z=t1+(zz-ua)) == t1+(zz+ua))  return signArctan2(y,z);
-
-	t1=u-hij[i][0].d;
-	EADD(t1,du,v,vv)
-	s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
-	   v*(hij[i][14].d+v* hij[i][15].d))));
-	ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
-	ADD2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
-	if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-    }
-
-    /* (iv)  x<0, abs(y)<=abs(x):  pi-atan(ax/ay) */
-    else {
-      if (u<inv16.d) {
-	v=u*u;
-	zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
-	ESUB(opi.d,u,t2,cor)
-	t3=((opi1.d+cor)-du)-zz;
-	if ((z=t2+(t3-u4.d)) == t2+(t3+u4.d))  return signArctan2(y,z);
-
-	MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
-	s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
-	ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
-	SUB2(opi.d,opi1.d,s1,ss1,s2,ss2,t1,t2)
-	if ((z=s2+(ss2-u8.d)) == s2+(ss2+u8.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-      else {
-	i=(TWO52+TWO8*u)-TWO52;  i-=16;
-	v=(u-cij[i][0].d)+du;
-	zz=opi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
-				 v*(cij[i][5].d+v* cij[i][6].d))));
-	t1=opi.d-cij[i][1].d;
-	if (i<112)  ua=ua1.d;  /* w <  1/2 */
-	else        ua=ua2.d;  /* w >= 1/2 */
-	if ((z=t1+(zz-ua)) == t1+(zz+ua))  return signArctan2(y,z);
-
-	t1=u-hij[i][0].d;
-	EADD(t1,du,v,vv)
-	s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
-	   v*(hij[i][14].d+v* hij[i][15].d))));
-	ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
-	MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
-	ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
-	SUB2(opi.d,opi1.d,s2,ss2,s1,ss1,t1,t2)
-	if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d))  return signArctan2(y,z);
-	return atan2Mp(x,y,pr);
-      }
-    }
-  }
+  if (ay < ax)
+    {
+      u = ay / ax;
+      EMULV (ax, u, v, vv, t1, t2, t3, t4, t5);
+      du = ((ay - v) - vv) / ax;
+    }
+  else
+    {
+      u = ax / ay;
+      EMULV (ay, u, v, vv, t1, t2, t3, t4, t5);
+      du = ((ax - v) - vv) / ay;
+    }
+
+  if (x > ZERO)
+    {
+      /* (i)   x>0, abs(y)< abs(x):  atan(ay/ax) */
+      if (ay < ax)
+	{
+	  if (u < inv16.d)
+	    {
+	      v = u * u;
+
+	      zz = du + u * v * (d3.d
+				 + v * (d5.d
+					+ v * (d7.d
+					       + v * (d9.d
+						      + v * (d11.d
+							     + v * d13.d)))));
+
+	      if ((z = u + (zz - u1.d * u)) == u + (zz + u1.d * u))
+		return signArctan2 (y, z);
+
+	      MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8);
+	      s1 = v * (f11.d + v * (f13.d
+				     + v * (f15.d + v * (f17.d + v * f19.d))));
+	      ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2);
+	      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	      ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2);
+	      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	      ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2);
+	      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	      ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2);
+	      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	      MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8);
+	      ADD2 (u, du, s2, ss2, s1, ss1, t1, t2);
+
+	      if ((z = s1 + (ss1 - u5.d * s1)) == s1 + (ss1 + u5.d * s1))
+		return signArctan2 (y, z);
+
+	      return atan2Mp (x, y, pr);
+	    }
+
+	  i = (TWO52 + TWO8 * u) - TWO52;
+	  i -= 16;
+	  t3 = u - cij[i][0].d;
+	  EADD (t3, du, v, dv);
+	  t1 = cij[i][1].d;
+	  t2 = cij[i][2].d;
+	  zz = v * t2 + (dv * t2
+			 + v * v * (cij[i][3].d
+				    + v * (cij[i][4].d
+					   + v * (cij[i][5].d
+						  + v * cij[i][6].d))));
+	  if (i < 112)
+	    {
+	      if (i < 48)
+		u9 = u91.d;	/* u < 1/4	*/
+	      else
+		u9 = u92.d;
+	    }		/* 1/4 <= u < 1/2 */
+	  else
+	    {
+	      if (i < 176)
+		u9 = u93.d;	/* 1/2 <= u < 3/4 */
+	      else
+		u9 = u94.d;
+	    }		/* 3/4 <= u <= 1  */
+	  if ((z = t1 + (zz - u9 * t1)) == t1 + (zz + u9 * t1))
+	    return signArctan2 (y, z);
+
+	  t1 = u - hij[i][0].d;
+	  EADD (t1, du, v, vv);
+	  s1 = v * (hij[i][11].d
+		    + v * (hij[i][12].d
+			   +  v * (hij[i][13].d
+				   + v * (hij[i][14].d
+					  + v * hij[i][15].d))));
+	  ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2);
+
+	  if ((z = s2 + (ss2 - ub.d * s2)) == s2 + (ss2 + ub.d * s2))
+	    return signArctan2 (y, z);
+	  return atan2Mp (x, y, pr);
+	}
+
+      /* (ii)  x>0, abs(x)<=abs(y):  pi/2-atan(ax/ay) */
+      if (u < inv16.d)
+	{
+	  v = u * u;
+	  zz = u * v * (d3.d
+			+ v * (d5.d
+			       + v * (d7.d
+				      + v * (d9.d
+					     + v * (d11.d
+						    + v * d13.d)))));
+	  ESUB (hpi.d, u, t2, cor);
+	  t3 = ((hpi1.d + cor) - du) - zz;
+	  if ((z = t2 + (t3 - u2.d)) == t2 + (t3 + u2.d))
+	    return signArctan2 (y, z);
+
+	  MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8);
+	  s1 = v * (f11.d
+		    + v * (f13.d
+			   + v * (f15.d + v * (f17.d + v * f19.d))));
+	  ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (u, du, s2, ss2, s1, ss1, t1, t2);
+	  SUB2 (hpi.d, hpi1.d, s1, ss1, s2, ss2, t1, t2);
+
+	  if ((z = s2 + (ss2 - u6.d)) == s2 + (ss2 + u6.d))
+	    return signArctan2 (y, z);
+	  return atan2Mp (x, y, pr);
+	}
+
+      i = (TWO52 + TWO8 * u) - TWO52;
+      i -= 16;
+      v = (u - cij[i][0].d) + du;
+
+      zz = hpi1.d - v * (cij[i][2].d
+			 + v * (cij[i][3].d
+				+ v * (cij[i][4].d
+				       + v * (cij[i][5].d
+					      + v * cij[i][6].d))));
+      t1 = hpi.d - cij[i][1].d;
+      if (i < 112)
+	ua = ua1.d;	/* w <  1/2 */
+      else
+	ua = ua2.d;	/* w >= 1/2 */
+      if ((z = t1 + (zz - ua)) == t1 + (zz + ua))
+	return signArctan2 (y, z);
+
+      t1 = u - hij[i][0].d;
+      EADD (t1, du, v, vv);
+
+      s1 = v * (hij[i][11].d
+		+ v * (hij[i][12].d
+		       + v * (hij[i][13].d
+			      + v * (hij[i][14].d
+				     + v * hij[i][15].d))));
+
+      ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2);
+      SUB2 (hpi.d, hpi1.d, s2, ss2, s1, ss1, t1, t2);
+
+      if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d))
+	return signArctan2 (y, z);
+      return atan2Mp (x, y, pr);
+    }
+
+  /* (iii) x<0, abs(x)< abs(y):  pi/2+atan(ax/ay) */
+  if (ax < ay)
+    {
+      if (u < inv16.d)
+	{
+	  v = u * u;
+	  zz = u * v * (d3.d
+			+ v * (d5.d
+			       + v * (d7.d
+				      + v * (d9.d
+					     + v * (d11.d + v * d13.d)))));
+	  EADD (hpi.d, u, t2, cor);
+	  t3 = ((hpi1.d + cor) + du) + zz;
+	  if ((z = t2 + (t3 - u3.d)) == t2 + (t3 + u3.d))
+	    return signArctan2 (y, z);
+
+	  MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8);
+	  s1 = v * (f11.d
+		    + v * (f13.d + v * (f15.d + v * (f17.d + v * f19.d))));
+	  ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2);
+	  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+	  MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8);
+	  ADD2 (u, du, s2, ss2, s1, ss1, t1, t2);
+	  ADD2 (hpi.d, hpi1.d, s1, ss1, s2, ss2, t1, t2);
+
+	  if ((z = s2 + (ss2 - u7.d)) == s2 + (ss2 + u7.d))
+	    return signArctan2 (y, z);
+	  return atan2Mp (x, y, pr);
+	}
+
+      i = (TWO52 + TWO8 * u) - TWO52;
+      i -= 16;
+      v = (u - cij[i][0].d) + du;
+      zz = hpi1.d + v * (cij[i][2].d
+			 + v * (cij[i][3].d
+				+ v * (cij[i][4].d
+				       + v * (cij[i][5].d
+					      + v * cij[i][6].d))));
+      t1 = hpi.d + cij[i][1].d;
+      if (i < 112)
+	ua = ua1.d;	/* w <  1/2 */
+      else
+	ua = ua2.d;	/* w >= 1/2 */
+      if ((z = t1 + (zz - ua)) == t1 + (zz + ua))
+	return signArctan2 (y, z);
+
+      t1 = u - hij[i][0].d;
+      EADD (t1, du, v, vv);
+      s1 = v * (hij[i][11].d
+		+ v * (hij[i][12].d
+		       + v * (hij[i][13].d
+			      + v * (hij[i][14].d
+				     + v * hij[i][15].d))));
+      ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2);
+      ADD2 (hpi.d, hpi1.d, s2, ss2, s1, ss1, t1, t2);
+
+      if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d))
+	return signArctan2 (y, z);
+      return atan2Mp (x, y, pr);
+    }
+
+  /* (iv)  x<0, abs(y)<=abs(x):  pi-atan(ax/ay) */
+  if (u < inv16.d)
+    {
+      v = u * u;
+      zz = u * v * (d3.d
+		    + v * (d5.d
+			   + v * (d7.d
+				  + v * (d9.d + v * (d11.d + v * d13.d)))));
+      ESUB (opi.d, u, t2, cor);
+      t3 = ((opi1.d + cor) - du) - zz;
+      if ((z = t2 + (t3 - u4.d)) == t2 + (t3 + u4.d))
+	return signArctan2 (y, z);
+
+      MUL2 (u, du, u, du, v, vv, t1, t2, t3, t4, t5, t6, t7, t8);
+      s1 = v * (f11.d + v * (f13.d + v * (f15.d + v * (f17.d + v * f19.d))));
+      ADD2 (f9.d, ff9.d, s1, ZERO, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (f7.d, ff7.d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (f5.d, ff5.d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (f3.d, ff3.d, s1, ss1, s2, ss2, t1, t2);
+      MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+      MUL2 (u, du, s1, ss1, s2, ss2, t1, t2, t3, t4, t5, t6, t7, t8);
+      ADD2 (u, du, s2, ss2, s1, ss1, t1, t2);
+      SUB2 (opi.d, opi1.d, s1, ss1, s2, ss2, t1, t2);
+
+      if ((z = s2 + (ss2 - u8.d)) == s2 + (ss2 + u8.d))
+	return signArctan2 (y, z);
+      return atan2Mp (x, y, pr);
+    }
+
+  i = (TWO52 + TWO8 * u) - TWO52;
+  i -= 16;
+  v = (u - cij[i][0].d) + du;
+  zz = opi1.d - v * (cij[i][2].d
+		     + v * (cij[i][3].d
+			    + v * (cij[i][4].d
+				   + v * (cij[i][5].d + v * cij[i][6].d))));
+  t1 = opi.d - cij[i][1].d;
+  if (i < 112)
+    ua = ua1.d;	/* w <  1/2 */
+  else
+    ua = ua2.d;	/* w >= 1/2 */
+  if ((z = t1 + (zz - ua)) == t1 + (zz + ua))
+    return signArctan2 (y, z);
+
+  t1 = u - hij[i][0].d;
+
+  EADD (t1, du, v, vv);
+
+  s1 = v * (hij[i][11].d
+	    + v * (hij[i][12].d
+		   + v * (hij[i][13].d
+			  + v * (hij[i][14].d + v * hij[i][15].d))));
+
+  ADD2 (hij[i][9].d, hij[i][10].d, s1, ZERO, s2, ss2, t1, t2);
+  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+  ADD2 (hij[i][7].d, hij[i][8].d, s1, ss1, s2, ss2, t1, t2);
+  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+  ADD2 (hij[i][5].d, hij[i][6].d, s1, ss1, s2, ss2, t1, t2);
+  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+  ADD2 (hij[i][3].d, hij[i][4].d, s1, ss1, s2, ss2, t1, t2);
+  MUL2 (v, vv, s2, ss2, s1, ss1, t1, t2, t3, t4, t5, t6, t7, t8);
+  ADD2 (hij[i][1].d, hij[i][2].d, s1, ss1, s2, ss2, t1, t2);
+  SUB2 (opi.d, opi1.d, s2, ss2, s1, ss1, t1, t2);
+
+  if ((z = s1 + (ss1 - uc.d)) == s1 + (ss1 + uc.d))
+    return signArctan2 (y, z);
+  return atan2Mp (x, y, pr);
 }
+
 #ifndef __ieee754_atan2
 strong_alias (__ieee754_atan2, __atan2_finite)
 #endif
 
-  /* Treat the Denormalized case */
+/* Treat the Denormalized case */
 static double
 SECTION
-normalized(double ax,double ay,double y, double z)
-    { int p;
-      mp_no mpx,mpy,mpz,mperr,mpz2,mpt1;
-  p=6;
-  __dbl_mp(ax,&mpx,p);  __dbl_mp(ay,&mpy,p);  __dvd(&mpy,&mpx,&mpz,p);
-  __dbl_mp(ue.d,&mpt1,p);   __mul(&mpz,&mpt1,&mperr,p);
-  __sub(&mpz,&mperr,&mpz2,p);  __mp_dbl(&mpz2,&z,p);
-  return signArctan2(y,z);
+normalized (double ax, double ay, double y, double z)
+{
+  int p;
+  mp_no mpx, mpy, mpz, mperr, mpz2, mpt1;
+  p = 6;
+  __dbl_mp (ax, &mpx, p);
+  __dbl_mp (ay, &mpy, p);
+  __dvd (&mpy, &mpx, &mpz, p);
+  __dbl_mp (ue.d, &mpt1, p);
+  __mul (&mpz, &mpt1, &mperr, p);
+  __sub (&mpz, &mperr, &mpz2, p);
+  __mp_dbl (&mpz2, &z, p);
+  return signArctan2 (y, z);
 }
-  /* Stage 3: Perform a multi-Precision computation */
+
+/* Stage 3: Perform a multi-Precision computation */
 static double
 SECTION
-atan2Mp(double x,double y,const int pr[])
+atan2Mp (double x, double y, const int pr[])
 {
-  double z1,z2;
-  int i,p;
-  mp_no mpx,mpy,mpz,mpz1,mpz2,mperr,mpt1;
-  for (i=0; i<MM; i++) {
-    p = pr[i];
-    __dbl_mp(x,&mpx,p);  __dbl_mp(y,&mpy,p);
-    __mpatan2(&mpy,&mpx,&mpz,p);
-    __dbl_mp(ud[i].d,&mpt1,p);   __mul(&mpz,&mpt1,&mperr,p);
-    __add(&mpz,&mperr,&mpz1,p);  __sub(&mpz,&mperr,&mpz2,p);
-    __mp_dbl(&mpz1,&z1,p);       __mp_dbl(&mpz2,&z2,p);
-    if (z1==z2)   return z1;
-  }
-  return z1; /*if unpossible to do exact computing */
+  double z1, z2;
+  int i, p;
+  mp_no mpx, mpy, mpz, mpz1, mpz2, mperr, mpt1;
+  for (i = 0; i < MM; i++)
+    {
+      p = pr[i];
+      __dbl_mp (x, &mpx, p);
+      __dbl_mp (y, &mpy, p);
+      __mpatan2 (&mpy, &mpx, &mpz, p);
+      __dbl_mp (ud[i].d, &mpt1, p);
+      __mul (&mpz, &mpt1, &mperr, p);
+      __add (&mpz, &mperr, &mpz1, p);
+      __sub (&mpz, &mperr, &mpz2, p);
+      __mp_dbl (&mpz1, &z1, p);
+      __mp_dbl (&mpz2, &z2, p);
+      if (z1 == z2)
+	return z1;
+    }
+  return z1;			/*if impossible to do exact computing */
 }

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_logl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_logl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/e_logl.c Fri Mar 29 00:02:05 2013
@@ -182,6 +182,9 @@
   ln2a = 6.93145751953125e-1L,
   ln2b = 1.4286068203094172321214581765680755001344E-6L;
 
+static const long double
+  ldbl_epsilon = 0x1p-106L;
+
 long double
 __ieee754_logl(long double x)
 {
@@ -258,7 +261,12 @@
     }
   /* Series expansion of log(1+z).  */
   w = z * z;
-  y = ((((((((((((l15 * z
+  /* Avoid spurious underflows.  */
+  if (__glibc_unlikely(w <= ldbl_epsilon))
+    y = 0.0L;
+  else
+    {
+      y = ((((((((((((l15 * z
 		  + l14) * z
 		 + l13) * z
 		+ l12) * z
@@ -271,7 +279,8 @@
 	 + l5) * z
 	+ l4) * z
        + l3) * z * w;
-  y -= 0.5 * w;
+      y -= 0.5 * w;
+    }
   y += e * ln2b;  /* Base 2 exponent offset times ln(2).  */
   y += z;
   y += logtbl[k-26]; /* log(t) - (t-1) */

Modified: fsf/trunk/libc/sysdeps/mach/hurd/i386/init-first.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/i386/init-first.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/i386/init-first.c Fri Mar 29 00:02:05 2013
@@ -106,10 +106,6 @@
   char **argv = &arg0;
   char **envp = &argv[argc + 1];
   struct hurd_startup_data *d;
-#ifndef SHARED
-  extern ElfW(Phdr) *_dl_phdr;
-  extern size_t _dl_phnum;
-#endif
 
   while (*envp)
     ++envp;
@@ -121,14 +117,20 @@
   if ((void *) d == argv[0])
     {
 #ifndef SHARED
-      /* We may need to see our own phdrs, e.g. for TLS setup.
-	 Try the usual kludge to find the headers without help from
-	 the exec server.  */
-      extern const void _start;
-      const ElfW(Ehdr) *const ehdr = &_start;
-      _dl_phdr = (ElfW(Phdr) *) ((const void *) ehdr + ehdr->e_phoff);
-      _dl_phnum = ehdr->e_phnum;
-      assert (ehdr->e_phentsize == sizeof (ElfW(Phdr)));
+      /* With a new enough linker (binutils-2.23 or better),
+         the magic __ehdr_start symbol will be available and
+         __libc_start_main will have done this that way already.  */
+      if (_dl_phdr == NULL)
+        {
+          /* We may need to see our own phdrs, e.g. for TLS setup.
+             Try the usual kludge to find the headers without help from
+             the exec server.  */
+          extern const void _start;
+          const ElfW(Ehdr) *const ehdr = &_start;
+          _dl_phdr = (const void *) ehdr + ehdr->e_phoff;
+          _dl_phnum = ehdr->e_phnum;
+          assert (ehdr->e_phentsize == sizeof (ElfW(Phdr)));
+        }
 #endif
       return;
     }

Modified: fsf/trunk/libc/sysdeps/posix/libc_fatal.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/libc_fatal.c (original)
+++ fsf/trunk/libc/sysdeps/posix/libc_fatal.c Fri Mar 29 00:02:05 2013
@@ -29,7 +29,6 @@
 #include <sysdep.h>
 #include <unistd.h>
 #include <sys/mman.h>
-#include <sys/syslog.h>
 #include <sys/uio.h>
 #include <not-cancel.h>
 
@@ -68,11 +67,9 @@
 __libc_message (int do_abort, const char *fmt, ...)
 {
   va_list ap;
-  va_list ap_copy;
   int fd = -1;
 
   va_start (ap, fmt);
-  va_copy (ap_copy, ap);
 
 #ifdef FATAL_PREPARE
   FATAL_PREPARE;
@@ -170,12 +167,6 @@
 
   va_end (ap);
 
-  /* If we  had no success writing the message, use syslog.  */
-  if (! written)
-    vsyslog (LOG_ERR, fmt, ap_copy);
-
-  va_end (ap_copy);
-
   if (do_abort)
     {
       BEFORE_ABORT (do_abort, written, fd);

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Fri Mar 29 00:02:05 2013
@@ -243,9 +243,11 @@
 Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i":
 double: 1
 idouble: 1
+ldouble: 1
 Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i":
 double: 1
 idouble: 1
+ldouble: 1
 Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i":
 double: 1
 float: 1
@@ -265,6 +267,10 @@
 float: 1
 idouble: 1
 ifloat: 1
+Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i":
+ldouble: 1
+Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i":
+ldouble: 1
 
 # cacosh
 Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/start.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/start.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/start.S Fri Mar 29 00:02:05 2013
@@ -34,6 +34,13 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+
+/* We do not want .eh_frame info for crt1.o since crt1.o is linked
+   before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
+#undef cfi_startproc
+#define cfi_startproc
+#undef cfi_endproc
+#define cfi_endproc
 
  /* These are the various addresses we require.  */
 #ifdef PIC

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/start.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/start.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/start.S Fri Mar 29 00:02:05 2013
@@ -34,6 +34,13 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+
+/* We do not want .eh_frame info for crt1.o since crt1.o is linked
+   before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
+#undef cfi_startproc
+#define cfi_startproc
+#undef cfi_endproc
+#define cfi_endproc
 
  /* These are the various addresses we require.  */
 #ifdef PIC

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits