aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2015-05-15 10:53:55 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2015-05-15 11:04:40 +0000
commit0e9be4db8f655d3dc006c5b101f15a5912a5846f (patch)
treeb03088c533aab59ee41220bd469433d2a2abb527 /sysdeps/ieee754/dbl-64/branred.c
parentFix erfcf spurious underflows (bug 18217). (diff)
downloadglibc-0e9be4db8f655d3dc006c5b101f15a5912a5846f.tar.gz
glibc-0e9be4db8f655d3dc006c5b101f15a5912a5846f.tar.bz2
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/branred.c')
-rw-r--r--sysdeps/ieee754/dbl-64/branred.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/branred.c b/sysdeps/ieee754/dbl-64/branred.c
index 331cde2d56..7757a9c833 100644
--- a/sysdeps/ieee754/dbl-64/branred.c
+++ b/sysdeps/ieee754/dbl-64/branred.c
@@ -35,6 +35,7 @@
#include "endian.h"
#include "mydefs.h"
#include "branred.h"
+#include <math.h>
#include <math_private.h>
#ifndef SECTION
@@ -123,7 +124,7 @@ __branred(double x, double *a, double *aa)
sum=sum1+sum2;
b=b1+b2;
- bb = (ABS(b1)>ABS(b2))? (b1-b)+b2 : (b2-b)+b1;
+ bb = (fabs(b1)>fabs(b2))? (b1-b)+b2 : (b2-b)+b1;
if (b > 0.5)
{b-=1.0; sum+=1.0;}
else if (b < -0.5)