diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2015-05-15 10:53:55 +0000 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2015-05-15 11:04:40 +0000 |
commit | 0e9be4db8f655d3dc006c5b101f15a5912a5846f (patch) | |
tree | b03088c533aab59ee41220bd469433d2a2abb527 /sysdeps/ieee754/dbl-64/e_asin.c | |
parent | fbc68f03b0e56db6a07d789fd403eb79d726fe96 (diff) | |
download | glibc-0e9be4db8f655d3dc006c5b101f15a5912a5846f.tar.gz glibc-0e9be4db8f655d3dc006c5b101f15a5912a5846f.tar.xz glibc-0e9be4db8f655d3dc006c5b101f15a5912a5846f.zip |
Remove various ABS macros and replace uses with fabs (or in one case abs)
which is more efficient on all targets.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/e_asin.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_asin.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c index b87e557988..a7684d1078 100644 --- a/sysdeps/ieee754/dbl-64/e_asin.c +++ b/sysdeps/ieee754/dbl-64/e_asin.c @@ -104,9 +104,9 @@ __ieee754_asin(double x){ __doasin(x,0,w); if (w[0]==(w[0]+1.00000001*w[1])) return w[0]; else { - y=ABS(x); - res=ABS(w[0]); - res1=ABS(w[0]+1.1*w[1]); + y=fabs(x); + res=fabs(w[0]); + res1=fabs(w[0]+1.1*w[1]); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -135,11 +135,11 @@ __ieee754_asin(double x){ res1=res+1.1*cor; z=0.5*(res1-res); __dubsin(res,z,w); - z=(w[0]-ABS(x))+w[1]; + z=(w[0]-fabs(x))+w[1]; if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1); else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1); else { - y=ABS(x); + y=fabs(x); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -168,11 +168,11 @@ __ieee754_asin(double x){ res1=res+1.1*cor; z=0.5*(res1-res); __dubsin(res,z,w); - z=(w[0]-ABS(x))+w[1]; + z=(w[0]-fabs(x))+w[1]; if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1); else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1); else { - y=ABS(x); + y=fabs(x); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -203,11 +203,11 @@ __ieee754_asin(double x){ y=hp0.x-res; z=((hp0.x-y)-res)+(hp1.x-z); __dubcos(y,z,w); - z=(w[0]-ABS(x))+w[1]; + z=(w[0]-fabs(x))+w[1]; if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1); else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1); else { - y=ABS(x); + y=fabs(x); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -241,11 +241,11 @@ __ieee754_asin(double x){ z=y+hp1.x; y=(y-z)+hp1.x; __dubcos(z,y,w); - z=(w[0]-ABS(x))+w[1]; + z=(w[0]-fabs(x))+w[1]; if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1); else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1); else { - y=ABS(x); + y=fabs(x); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -280,11 +280,11 @@ __ieee754_asin(double x){ z=y+hp1.x; y=(y-z)+hp1.x; __dubcos(z,y,w); - z=(w[0]-ABS(x))+w[1]; + z=(w[0]-fabs(x))+w[1]; if (z>1.0e-27) return (m>0)?min(res,res1):-min(res,res1); else if (z<-1.0e-27) return (m>0)?max(res,res1):-max(res,res1); else { - y=ABS(x); + y=fabs(x); return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } } @@ -318,7 +318,7 @@ __ieee754_asin(double x){ cor = (res1-res)+cor; if (res==(res+1.0000001*cor)) return (m>0)?res:-res; else { - y=ABS(x); + y=fabs(x); res1=res+1.1*cor; return (m>0)?__sin32(y,res,res1):-__sin32(y,res,res1); } |