aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nexttoward.c4
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nexttowardf.c5
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nexttoward.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nexttowardf.c4
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c4
7 files changed, 16 insertions, 13 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_nexttoward.c b/sysdeps/ieee754/ldbl-128/s_nexttoward.c
index e62ca3f..2ee7a1b 100644
--- a/sysdeps/ieee754/ldbl-128/s_nexttoward.c
+++ b/sysdeps/ieee754/ldbl-128/s_nexttoward.c
@@ -73,8 +73,8 @@ double __nexttoward(double x, long double y)
}
hy = hx&0x7ff00000;
if(hy>=0x7ff00000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ double u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00100000) {
double u = x*x; /* underflow */
diff --git a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
index ccd49d2..9c9c7e5 100644
--- a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
+++ b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
@@ -59,7 +59,10 @@ float __nexttowardf(float x, long double y)
}
}
hy = hx&0x7f800000;
- if(hy>=0x7f800000) return x+x; /* overflow */
+ if(hy>=0x7f800000) {
+ float u = x+x; /* overflow */
+ math_force_eval (u);
+ }
if(hy<0x00800000) {
float u = x*x; /* underflow */
math_force_eval (u); /* raise underflow flag */
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c b/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
index 85140c1..8c61198 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
@@ -74,8 +74,8 @@ double __nexttoward(double x, long double y)
}
hy = hx&0x7ff00000;
if(hy>=0x7ff00000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ double u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00100000) {
double u = x*x; /* underflow */
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c b/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c
index b27f0bb..4000a93 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c
@@ -63,8 +63,8 @@ float __nexttowardf(float x, long double y)
}
hy = hx&0x7f800000;
if(hy>=0x7f800000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ float u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00800000) { /* underflow */
float u = x*x;
diff --git a/sysdeps/ieee754/ldbl-96/s_nexttoward.c b/sysdeps/ieee754/ldbl-96/s_nexttoward.c
index b972a3e..7908f9c 100644
--- a/sysdeps/ieee754/ldbl-96/s_nexttoward.c
+++ b/sysdeps/ieee754/ldbl-96/s_nexttoward.c
@@ -70,8 +70,8 @@ double __nexttoward(double x, long double y)
}
hy = hx&0x7ff00000;
if(hy>=0x7ff00000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ double u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00100000) {
double u = x*x; /* underflow */
diff --git a/sysdeps/ieee754/ldbl-96/s_nexttowardf.c b/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
index f1fe4e7..53c527d 100644
--- a/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
+++ b/sysdeps/ieee754/ldbl-96/s_nexttowardf.c
@@ -58,8 +58,8 @@ float __nexttowardf(float x, long double y)
}
hy = hx&0x7f800000;
if(hy>=0x7f800000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ float u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00800000) {
float u = x*x; /* underflow */
diff --git a/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c b/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
index 782e1a3..dbcf840 100644
--- a/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
+++ b/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
@@ -62,8 +62,8 @@ float __nldbl_nexttowardf(float x, double y)
}
hy = hx&0x7f800000;
if(hy>=0x7f800000) {
- x = math_narrow_eval (x+x); /* overflow */
- return x;
+ float u = x+x; /* overflow */
+ math_force_eval (u);
}
if(hy<0x00800000) {
float u = x*x; /* underflow */