diff options
-rw-r--r-- | lib/libm/arch/vax/n_support.S | 8 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_atan2.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_cabs.c | 10 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_cosh.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_exp.c | 14 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_expm1.c | 10 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_log1p.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_pow.c | 2 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_sinh.c | 4 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_support.c | 16 |
10 files changed, 38 insertions, 38 deletions
diff --git a/lib/libm/arch/vax/n_support.S b/lib/libm/arch/vax/n_support.S index 341d353498e..084c8a5121c 100644 --- a/lib/libm/arch/vax/n_support.S +++ b/lib/libm/arch/vax/n_support.S @@ -41,7 +41,7 @@ _sccsid: /* * copysign(x,y), * logb(x), - * scalb(x,N), + * scalbn(x,N), * finite(x), * drem(x,y), * Coded in vax assembly language by K.C. Ng, 3/14/85. @@ -103,14 +103,14 @@ _finite: ret /* - * double scalb(x,N) + * double scalbn(x,N) * double x; double N; */ - .globl _scalb + .globl _scalbn .set ERANGE,34 .text .align 1 -_scalb: +_scalbn: .word 0x3c movq 4(ap),r0 bicl3 $0xffff807f,r0,r3 diff --git a/lib/libm/noieee_src/n_atan2.c b/lib/libm/noieee_src/n_atan2.c index 8e675095f7e..57efcad5970 100644 --- a/lib/libm/noieee_src/n_atan2.c +++ b/lib/libm/noieee_src/n_atan2.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)atan2.c 8.1 (Berkeley) 6/4/93"; * * Required system supported functions : * copysign(x,y) - * scalb(x,y) + * scalbn(x,y) * logb(x) * * Method : @@ -213,7 +213,7 @@ double y,x; y=copysign(y,one); if((m=(k=logb(y))-logb(x)) > 60) t=big+big; else if(m < -80 ) t=y/x; - else { t = y/x ; y = scalb(y,-k); x=scalb(x,-k); } + else { t = y/x ; y = scalbn(y,-k); x=scalbn(x,-k); } /* begin argument reduction */ begin: diff --git a/lib/libm/noieee_src/n_cabs.c b/lib/libm/noieee_src/n_cabs.c index f7c153e473b..097a0b6a020 100644 --- a/lib/libm/noieee_src/n_cabs.c +++ b/lib/libm/noieee_src/n_cabs.c @@ -45,7 +45,7 @@ static char sccsid[] = "@(#)cabs.c 8.1 (Berkeley) 6/4/93"; * Required system supported functions : * copysign(x,y) * finite(x) - * scalb(x,N) + * scalbn(x,N) * sqrt(x) * * Method : @@ -208,12 +208,12 @@ double x, y; if(x == zero) return(zero); if(y == zero) return(x); exp= logb(x); - x=scalb(x,-exp); + x=scalbn(x,-exp); if(exp-(int)logb(y) > ibig ) /* raise inexact flag and return |x| */ - { one+small; return(scalb(x,exp)); } - else y=scalb(y,-exp); - return(scalb(sqrt(x*x+y*y),exp)); + { one+small; return(scalbn(x,exp)); } + else y=scalbn(y,-exp); + return(scalbn(sqrt(x*x+y*y),exp)); } else if(y==y) /* y is +-INF */ diff --git a/lib/libm/noieee_src/n_cosh.c b/lib/libm/noieee_src/n_cosh.c index 37dceb41359..820fefab011 100644 --- a/lib/libm/noieee_src/n_cosh.c +++ b/lib/libm/noieee_src/n_cosh.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)cosh.c 8.1 (Berkeley) 6/4/93"; * * Required system supported functions : * copysign(x,y) - * scalb(x,N) + * scalbn(x,N) * * Required kernel function: * exp(x) @@ -127,7 +127,7 @@ double x; /* for x lies in [lnovfl, lnovfl+ln2], decrease x by ln(2^(max+1)) * and return 2^max*exp(x) to avoid unnecessary overflow */ - return(scalb(exp((x-mln2hi)-mln2lo), max)); + return(scalbn(exp((x-mln2hi)-mln2lo), max)); else return(exp(x)*half); /* for large x, cosh(x)=exp(x)/2 */ diff --git a/lib/libm/noieee_src/n_exp.c b/lib/libm/noieee_src/n_exp.c index 9077f7e1205..7c171e90d2a 100644 --- a/lib/libm/noieee_src/n_exp.c +++ b/lib/libm/noieee_src/n_exp.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 6/4/93"; * REVISED BY K.C. NG on 2/6/85, 2/15/85, 3/7/85, 3/24/85, 4/16/85, 6/14/86. * * Required system supported functions: - * scalb(x,n) + * scalbn(x,n) * copysign(x,y) * finite(x) * @@ -139,14 +139,14 @@ double x; /* return 2^k*[1+x+x*c/(2+c)] */ z=x*x; c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5)))); - return scalb(1.0+(hi-(lo-(x*c)/(2.0-c))),k); + return scalbn(1.0+(hi-(lo-(x*c)/(2.0-c))),k); } /* end of x > lntiny */ else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalb(1.0,-5000)); + if(finite(x)) return(scalbn(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -155,7 +155,7 @@ double x; else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalb(1.0,5000) : x); + return( finite(x) ? scalbn(1.0,5000) : x); } /* returns exp(r = x + c) for |c| < |x| with no overlap. */ @@ -185,13 +185,13 @@ double x, c; c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5)))); c = (x*c)/(2.0-c); - return scalb(1.+(hi-(lo - c)), k); + return scalbn(1.+(hi-(lo - c)), k); } /* end of x > lntiny */ else /* exp(-big#) underflows to zero */ - if(finite(x)) return(scalb(1.0,-5000)); + if(finite(x)) return(scalbn(1.0,-5000)); /* exp(-INF) is zero */ else return(0.0); @@ -200,5 +200,5 @@ double x, c; else /* exp(INF) is INF, exp(+big#) overflows to INF */ - return( finite(x) ? scalb(1.0,5000) : x); + return( finite(x) ? scalbn(1.0,5000) : x); } diff --git a/lib/libm/noieee_src/n_expm1.c b/lib/libm/noieee_src/n_expm1.c index 78fe224dfb8..de46d695fe5 100644 --- a/lib/libm/noieee_src/n_expm1.c +++ b/lib/libm/noieee_src/n_expm1.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)expm1.c 8.1 (Berkeley) 6/4/93"; * REVISED BY K.C. NG on 2/6/85, 3/7/85, 3/21/85, 4/16/85. * * Required system supported functions: - * scalb(x,n) + * scalbn(x,n) * copysign(x,y) * finite(x) * @@ -141,13 +141,13 @@ double x; else { if(k<=prec) - { x=one-scalb(one,-k); z += __exp__E(z,c);} + { x=one-scalbn(one,-k); z += __exp__E(z,c);} else if(k<100) - { x = __exp__E(z,c)-scalb(one,-k); x+=z; z=one;} + { x = __exp__E(z,c)-scalbn(one,-k); x+=z; z=one;} else { x = __exp__E(z,c)+z; z=one;} - return (scalb(x+z,k)); + return (scalbn(x+z,k)); } } /* end of x > lnunfl */ @@ -164,5 +164,5 @@ double x; else /* expm1(INF) is INF, expm1(+big#) overflows to INF */ - return( finite(x) ? scalb(one,5000) : x); + return( finite(x) ? scalbn(one,5000) : x); } diff --git a/lib/libm/noieee_src/n_log1p.c b/lib/libm/noieee_src/n_log1p.c index c3ec4acf3bc..a299d9b95a5 100644 --- a/lib/libm/noieee_src/n_log1p.c +++ b/lib/libm/noieee_src/n_log1p.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)log1p.c 8.1 (Berkeley) 6/4/93"; * REVISED BY K.C. NG on 2/6/85, 3/7/85, 3/24/85, 4/16/85. * * Required system supported functions: - * scalb(x,n) + * scalbn(x,n) * copysign(x,y) * logb(x) * finite(x) @@ -129,7 +129,7 @@ double x; /* argument reduction */ if(copysign(x,one)<small) return(x); - k=logb(one+x); z=scalb(x,-k); t=scalb(one,-k); + k=logb(one+x); z=scalbn(x,-k); t=scalbn(one,-k); if(z+t >= sqrt2 ) { k += 1 ; z *= half; t *= half; } t += negone; x = z + t; diff --git a/lib/libm/noieee_src/n_pow.c b/lib/libm/noieee_src/n_pow.c index c2e15d6eb4c..55f1c531fae 100644 --- a/lib/libm/noieee_src/n_pow.c +++ b/lib/libm/noieee_src/n_pow.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)pow.c 8.1 (Berkeley) 6/4/93"; * REVISED BY K.C. NG on 7/10/85. * KERNEL pow_P() REPLACED BY P. McILROY 7/22/92. * Required system supported functions: - * scalb(x,n) + * scalbn(x,n) * logb(x) * copysign(x,y) * finite(x) diff --git a/lib/libm/noieee_src/n_sinh.c b/lib/libm/noieee_src/n_sinh.c index 831d63824fe..4fa3e4b1b9c 100644 --- a/lib/libm/noieee_src/n_sinh.c +++ b/lib/libm/noieee_src/n_sinh.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)sinh.c 8.1 (Berkeley) 6/4/93"; * * Required system supported functions : * copysign(x,y) - * scalb(x,N) + * scalbn(x,N) * * Required kernel functions: * expm1(x) ...return exp(x)-1 @@ -115,7 +115,7 @@ double x; else if(x <= lnovfl+0.7) /* subtract x by ln(2^(max+1)) and return 2^max*exp(x) to avoid unnecessary overflow */ - return(copysign(scalb(one+expm1((x-mln2hi)-mln2lo),max),sign)); + return(copysign(scalbn(one+expm1((x-mln2hi)-mln2lo),max),sign)); else /* sinh(+-INF) = +-INF, sinh(+-big no.) overflow to +-INF */ return( expm1(x)*sign ); diff --git a/lib/libm/noieee_src/n_support.c b/lib/libm/noieee_src/n_support.c index 248996cece0..488b0193b15 100644 --- a/lib/libm/noieee_src/n_support.c +++ b/lib/libm/noieee_src/n_support.c @@ -59,7 +59,7 @@ static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 6/4/93"; * IEEE 754 recommended functions: * (a) copysign(x,y) * returns x with the sign of y. - * (b) scalb(x,N) + * (b) scalbn(x,N) * returns x * (2**N), for integer values N. * (c) logb(x) * returns the unbiased exponent of x, a signed integer in @@ -87,7 +87,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; @@ -111,7 +111,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 ) @@ -120,7 +120,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); } @@ -233,7 +233,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);} @@ -299,8 +299,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;} @@ -331,7 +331,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 |