about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-96
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2018-03-15 18:05:03 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2018-03-15 19:21:36 +0000
commitf67a8147b0ac274655c6c5c3b4c8bcb02be5745b (patch)
tree1fe21849a6ae923ddfd2c81e8e70ecd06fd96806 /sysdeps/ieee754/ldbl-96
parent1294b1892e19d70e9e4dca0a2f3e39497f262a42 (diff)
downloadglibc-f67a8147b0ac274655c6c5c3b4c8bcb02be5745b.tar.gz
glibc-f67a8147b0ac274655c6c5c3b4c8bcb02be5745b.tar.xz
glibc-f67a8147b0ac274655c6c5c3b4c8bcb02be5745b.zip
Rename all __ieee754_sqrt(f/l) calls to sqrt(f/l)
Use sqrt(f/l) to enable inlining by GCC - if inlining doesn't happen,
the asm redirect ensures we will still call __ieee754_sqrt(f/l).

	* sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Use sqrt.
	* sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Likewise.
	* sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise.
	* sysdeps/ieee754/dbl-64/e_j0.c (__ieee754_j0): Likewise.
	* sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_j1): Likewise.
	* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
	* sysdeps/ieee754/dbl-64/s_asinh.c (__asinh): Likewise.
	* sysdeps/ieee754/dbl-64/wordsize-64/e_acosh.c (__ieee754_acosh): Likewise.
	* sysdeps/ieee754/flt-32/e_acosf.c (__ieee754_acosf): Likewise.
	* sysdeps/ieee754/flt-32/e_acoshf.c (__ieee754_acoshf): Likewise.
	* sysdeps/ieee754/flt-32/e_asinf.c (__ieee754_asinf): Likewise.
	* sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Likewise.
	* sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Likewise.
	* sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_j0f): Likewise.
	* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_j1f): Likewise.
	* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise.
	* sysdeps/ieee754/flt-32/s_asinhf.c (__asinhf): Likewise.
	* sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): Use sqrtl.
	* sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Likewise.
	* sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Likewise.
	* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise.
	* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
	* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise.
	* sysdeps/ieee754/ldbl-128/s_asinhl.c (__ieee754_asinhl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_hypotl.c (__ieee754_hypotl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_j0l.c (__ieee754_j0l): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_j1l.c (__ieee754_j1l): Likewise
	* sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__ieee754_asinhl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Use sqrtl.
	* sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Likewise.
	* sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise.
	* sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise.
	* sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise.
	* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_asinhl.c (__ieee754_asinhl): Likewise.
	* sysdeps/m68k/m680x0/fpu/e_pow.c (__ieee754_pow): Likewise.
	* sysdeps/powerpc/fpu/e_hypot.c (__ieee754_hypot): Likewise.
	* sysdeps/powerpc/fpu/e_hypotf.c (__ieee754_hypotf): Likewise.
Diffstat (limited to 'sysdeps/ieee754/ldbl-96')
-rw-r--r--sysdeps/ieee754/ldbl-96/e_acoshl.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/e_asinl.c2
-rw-r--r--sysdeps/ieee754/ldbl-96/e_gammal_r.c2
-rw-r--r--sysdeps/ieee754/ldbl-96/e_hypotl.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/e_j0l.c8
-rw-r--r--sysdeps/ieee754/ldbl-96/e_j1l.c8
-rw-r--r--sysdeps/ieee754/ldbl-96/e_jnl.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/s_asinhl.c4
8 files changed, 18 insertions, 18 deletions
diff --git a/sysdeps/ieee754/ldbl-96/e_acoshl.c b/sysdeps/ieee754/ldbl-96/e_acoshl.c
index 381deb56a6..56b04d4cc4 100644
--- a/sysdeps/ieee754/ldbl-96/e_acoshl.c
+++ b/sysdeps/ieee754/ldbl-96/e_acoshl.c
@@ -52,10 +52,10 @@ __ieee754_acoshl(long double x)
 	    return 0.0;			/* acosh(1) = 0 */
 	} else if (se > 0x4000) {	/* 2**28 > x > 2 */
 	    t=x*x;
-	    return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one)));
+	    return __ieee754_logl(2.0*x-one/(x+sqrtl(t-one)));
 	} else {			/* 1<x<2 */
 	    t = x-one;
-	    return __log1pl(t+__ieee754_sqrtl(2.0*t+t*t));
+	    return __log1pl(t+sqrtl(2.0*t+t*t));
 	}
 }
 strong_alias (__ieee754_acoshl, __acoshl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_asinl.c b/sysdeps/ieee754/ldbl-96/e_asinl.c
index 71ce0e8791..85982ca158 100644
--- a/sysdeps/ieee754/ldbl-96/e_asinl.c
+++ b/sysdeps/ieee754/ldbl-96/e_asinl.c
@@ -132,7 +132,7 @@ __ieee754_asinl (long double x)
   t = w * 0.5;
   p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5)))));
   q = qS0 + t * (qS1 + t * (qS2 + t * (qS3 + t * (qS4 + t))));
-  s = __ieee754_sqrtl (t);
+  s = sqrtl (t);
   if (ix >= 0x3ffef999)
     {				/* if |x| > 0.975 */
       w = p / q;
diff --git a/sysdeps/ieee754/ldbl-96/e_gammal_r.c b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
index a759eb187b..5e5fd100c5 100644
--- a/sysdeps/ieee754/ldbl-96/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
@@ -100,7 +100,7 @@ gammal_positive (long double x, int *exp2_adj)
       long double ret = (__ieee754_powl (x_adj_mant, x_adj)
 			 * __ieee754_exp2l (x_adj_log2 * x_adj_frac)
 			 * __ieee754_expl (-x_adj)
-			 * __ieee754_sqrtl (2 * M_PIl / x_adj)
+			 * sqrtl (2 * M_PIl / x_adj)
 			 / prod);
       exp_adj += x_eps * __ieee754_logl (x_adj);
       long double bsum = gamma_coeff[NCOEFF - 1];
diff --git a/sysdeps/ieee754/ldbl-96/e_hypotl.c b/sysdeps/ieee754/ldbl-96/e_hypotl.c
index 337908f845..560ef226f4 100644
--- a/sysdeps/ieee754/ldbl-96/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-96/e_hypotl.c
@@ -117,7 +117,7 @@ long double __ieee754_hypotl(long double x, long double y)
 	    GET_LDOUBLE_MSW(high,a);
 	    SET_LDOUBLE_WORDS(t1,ea,high,0);
 	    t2 = a-t1;
-	    w  = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1)));
+	    w  = sqrtl(t1*t1-(b*(-b)-t2*(a+t1)));
 	} else {
 	    uint32_t high;
 	    GET_LDOUBLE_MSW(high,b);
@@ -127,7 +127,7 @@ long double __ieee754_hypotl(long double x, long double y)
 	    GET_LDOUBLE_MSW(high,a);
 	    SET_LDOUBLE_WORDS(t1,ea+1,high,0);
 	    t2 = a - t1;
-	    w  = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
+	    w  = sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b)));
 	}
 	if(k!=0) {
 	    uint32_t exp;
diff --git a/sysdeps/ieee754/ldbl-96/e_j0l.c b/sysdeps/ieee754/ldbl-96/e_j0l.c
index 4339d27c70..799812ae86 100644
--- a/sysdeps/ieee754/ldbl-96/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-96/e_j0l.c
@@ -133,12 +133,12 @@ __ieee754_j0l (long double x)
        * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
        */
       if (__glibc_unlikely (ix > 0x4080))      	/* 2^129 */
-	z = (invsqrtpi * cc) / __ieee754_sqrtl (x);
+	z = (invsqrtpi * cc) / sqrtl (x);
       else
 	{
 	  u = pzero (x);
 	  v = qzero (x);
-	  z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrtl (x);
+	  z = invsqrtpi * (u * cc - v * ss) / sqrtl (x);
 	}
       return z;
     }
@@ -235,12 +235,12 @@ __ieee754_y0l (long double x)
 	    ss = z / cc;
 	}
       if (__glibc_unlikely (ix > 0x4080))      	/* 1e39 */
-	z = (invsqrtpi * ss) / __ieee754_sqrtl (x);
+	z = (invsqrtpi * ss) / sqrtl (x);
       else
 	{
 	  u = pzero (x);
 	  v = qzero (x);
-	  z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrtl (x);
+	  z = invsqrtpi * (u * ss + v * cc) / sqrtl (x);
 	}
       return z;
     }
diff --git a/sysdeps/ieee754/ldbl-96/e_j1l.c b/sysdeps/ieee754/ldbl-96/e_j1l.c
index 4f07b0b327..6d0cb9ef67 100644
--- a/sysdeps/ieee754/ldbl-96/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-96/e_j1l.c
@@ -137,12 +137,12 @@ __ieee754_j1l (long double x)
        * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
        */
       if (__glibc_unlikely (ix > 0x4080))
-	z = (invsqrtpi * cc) / __ieee754_sqrtl (y);
+	z = (invsqrtpi * cc) / sqrtl (y);
       else
 	{
 	  u = pone (y);
 	  v = qone (y);
-	  z = invsqrtpi * (u * cc - v * ss) / __ieee754_sqrtl (y);
+	  z = invsqrtpi * (u * cc - v * ss) / sqrtl (y);
 	}
       if (se & 0x8000)
 	return -z;
@@ -231,12 +231,12 @@ __ieee754_y1l (long double x)
        * to compute the worse one.
        */
       if (__glibc_unlikely (ix > 0x4080))
-	z = (invsqrtpi * ss) / __ieee754_sqrtl (x);
+	z = (invsqrtpi * ss) / sqrtl (x);
       else
 	{
 	  u = pone (x);
 	  v = qone (x);
-	  z = invsqrtpi * (u * ss + v * cc) / __ieee754_sqrtl (x);
+	  z = invsqrtpi * (u * ss + v * cc) / sqrtl (x);
 	}
       return z;
     }
diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c
index d801ec619f..fe249b9126 100644
--- a/sysdeps/ieee754/ldbl-96/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-96/e_jnl.c
@@ -142,7 +142,7 @@ __ieee754_jnl (int n, long double x)
 		temp = c - s;
 		break;
 	      }
-	    b = invsqrtpi * temp / __ieee754_sqrtl (x);
+	    b = invsqrtpi * temp / sqrtl (x);
 	  }
 	else
 	  {
@@ -371,7 +371,7 @@ __ieee754_ynl (int n, long double x)
 	    temp = s + c;
 	    break;
 	  }
-	b = invsqrtpi * temp / __ieee754_sqrtl (x);
+	b = invsqrtpi * temp / sqrtl (x);
       }
     else
       {
diff --git a/sysdeps/ieee754/ldbl-96/s_asinhl.c b/sysdeps/ieee754/ldbl-96/s_asinhl.c
index 8f7db4ccf9..50a08ed90b 100644
--- a/sysdeps/ieee754/ldbl-96/s_asinhl.c
+++ b/sysdeps/ieee754/ldbl-96/s_asinhl.c
@@ -55,10 +55,10 @@ long double __asinhl(long double x)
 	} else {
 	    long double xa = fabsl(x);
 	    if (ix>0x4000) {	/* 2**34 > |x| > 2.0 */
-		w = __ieee754_logl(2.0*xa+one/(__ieee754_sqrtl(xa*xa+one)+xa));
+		w = __ieee754_logl(2.0*xa+one/(sqrtl(xa*xa+one)+xa));
 	    } else {		/* 2.0 > |x| > 2**-28 */
 		t = xa*xa;
-		w =__log1pl(xa+t/(one+__ieee754_sqrtl(one+t)));
+		w =__log1pl(xa+t/(one+sqrtl(one+t)));
 	    }
 	}
 	return __copysignl(w, x);