diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-05-30 05:51:47 +0000 |
commit | f05428e4cd63dde97bac14b84dd146a5c00455e3 (patch) | |
tree | e1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libm/ieee/cabs.c | |
parent | 6de57e42c294763c78d77b0a9a7c5a08008a378a (diff) | |
download | FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz |
Remove trailing whitespace.
Diffstat (limited to 'lib/libm/ieee/cabs.c')
-rw-r--r-- | lib/libm/ieee/cabs.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/libm/ieee/cabs.c b/lib/libm/ieee/cabs.c index c4a6fb0..5f1fc62 100644 --- a/lib/libm/ieee/cabs.c +++ b/lib/libm/ieee/cabs.c @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)cabs.c 8.1 (Berkeley) 6/4/93"; /* HYPOT(X,Y) * RETURN THE SQUARE ROOT OF X^2 + Y^2 WHERE Z=X+iY * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS) - * CODED IN C BY K.C. NG, 11/28/84; + * CODED IN C BY K.C. NG, 11/28/84; * REVISED BY K.C. NG, 7/12/85. * * Required system supported functions : @@ -52,16 +52,16 @@ static char sccsid[] = "@(#)cabs.c 8.1 (Berkeley) 6/4/93"; * y if y > x (hence x is never smaller than y). * 2. Hypot(x,y) is computed by: * Case I, x/y > 2 - * + * * y * hypot = x + ----------------------------- * 2 * sqrt ( 1 + [x/y] ) + x/y * - * Case II, x/y <= 2 + * Case II, x/y <= 2 * y * hypot = x + -------------------------------------------------- - * 2 + * 2 * [x/y] - 2 * (sqrt(2)+1) + (x-y)/y + ----------------------------- * 2 @@ -107,7 +107,7 @@ double hypot(x,y) double x, y; { - static const double zero=0, one=1, + static const double zero=0, one=1, small=1.0E-18; /* fl(1+small)==1 */ static const ibig=30; /* fl(1+2**(2*ibig))==1 */ double t,r; @@ -115,15 +115,15 @@ double x, y; if(finite(x)) if(finite(y)) - { + { x=copysign(x,one); y=copysign(y,one); - if(y > x) + if(y > x) { t=x; x=y; y=t; } if(x == zero) return(zero); if(y == zero) return(x); exp= logb(x); - if(exp-(int)logb(y) > ibig ) + if(exp-(int)logb(y) > ibig ) /* raise inexact flag and return |x| */ { one+small; return(x); } @@ -144,7 +144,7 @@ double x, y; else if(y==y) /* y is +-INF */ return(copysign(y,one)); - else + else return(y); /* y is NaN and x is finite */ else if(x==x) /* x is +-INF */ @@ -199,16 +199,16 @@ double x, y; if(finite(x)) if(finite(y)) - { + { x=copysign(x,one); y=copysign(y,one); - if(y > x) + if(y > x) { temp=x; x=y; y=temp; } if(x == zero) return(zero); if(y == zero) return(x); exp= logb(x); x=scalb(x,-exp); - if(exp-(int)logb(y) > ibig ) + if(exp-(int)logb(y) > ibig ) /* raise inexact flag and return |x| */ { one+small; return(scalb(x,exp)); } else y=scalb(y,-exp); @@ -217,7 +217,7 @@ double x, y; else if(y==y) /* y is +-INF */ return(copysign(y,one)); - else + else return(y); /* y is NaN and x is finite */ else if(x==x) /* x is +-INF */ |