This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 02/28] Rename unused scalb to scalbn to match prototype.
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 16 Aug 2013 05:32:17 -0300
- Subject: [PATCH 02/28] Rename unused scalb to scalbn to match prototype.
- References: <20130816081210 dot 22991 dot 30766 dot stgit at frit dot home>
for ChangeLog
* sysdeps/ieee754/support.c (scalbn): Rename from
wrongly-typed scalb. Adjust all callers. Apparently unused.
---
sysdeps/ieee754/support.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sysdeps/ieee754/support.c b/sysdeps/ieee754/support.c
index 00476c0..0bbd892f 100644
--- a/sysdeps/ieee754/support.c
+++ b/sysdeps/ieee754/support.c
@@ -82,7 +82,7 @@ static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 6/4/93";
static const double novf=1.7E308, nunf=3.0E-308,zero=0.0;
#endif /* defined(vax)||defined(tahoe) */
-double scalb(x,N)
+double scalbn(x,N)
double x; int N;
{
int k;
@@ -106,7 +106,7 @@ double x; int N;
if( (k= *px & mexp ) != mexp ) {
if( N<-2100) return(nunf*nunf); else if(N>2100) return(novf+novf);
if( k == 0 ) {
- x *= scalb(1.0,(int)prep1); N -= prep1; return(scalb(x,N));}
+ x *= scalbn(1.0,(int)prep1); N -= prep1; return(scalbn(x,N));}
#endif /* defined(vax)||defined(tahoe) */
if((k = (k>>gap)+ N) > 0 )
@@ -115,7 +115,7 @@ double x; int N;
else
if( k > -prep1 )
/* gradual underflow */
- {*px=(*px&~mexp)|(short)(1<<gap); x *= scalb(1.0,k-1);}
+ {*px=(*px&~mexp)|(short)(1<<gap); x *= scalbn(1.0,k-1);}
else
return(nunf*nunf);
}
@@ -228,7 +228,7 @@ double x,p;
else if ( ((*pp & mexp)>>gap) <= 1 )
/* subnormal p, or almost subnormal p */
- { double b; b=scalb(1.0,(int)prep1);
+ { double b; b=scalbn(1.0,(int)prep1);
p *= b; x = drem(x,p); x *= b; return(drem(x,p)/b);}
else if ( p >= novf/2)
{ p /= 2 ; x /= 2; return(drem(x,p)*2);}
@@ -294,8 +294,8 @@ double x;
/* scale x to [1,4) */
n=logb(x);
- x=scalb(x,-n);
- if((m=logb(x))!=0) x=scalb(x,-m); /* subnormal number */
+ x=scalbn(x,-n);
+ if((m=logb(x))!=0) x=scalbn(x,-m); /* subnormal number */
m += n;
n = m/2;
if((n+n)!=m) {x *= 2; m -=1; n=m/2;}
@@ -326,7 +326,7 @@ double x;
b=1.0+r/4; if(b>1.0) t=1;
if(t>=0) q+=r; }
-end: return(scalb(q,n));
+end: return(scalbn(q,n));
}
#if 0