[PATCH] replace use of double by float [BZ#29326]
Paul Zimmermann
Paul.Zimmermann@inria.fr
Fri Oct 10 08:05:29 GMT 2025
---
sysdeps/ieee754/flt-32/e_sqrtf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sysdeps/ieee754/flt-32/e_sqrtf.c b/sysdeps/ieee754/flt-32/e_sqrtf.c
index 1c0245b733..0e29375786 100644
--- a/sysdeps/ieee754/flt-32/e_sqrtf.c
+++ b/sysdeps/ieee754/flt-32/e_sqrtf.c
@@ -72,10 +72,10 @@ __ieee754_sqrtf(float x)
/* use floating add to find out rounding direction */
if(ix!=0) {
- z = 0x1p0 - 0x1.4484cp-100; /* trigger inexact flag. */
- if (z >= 0x1p0) {
- z = 0x1p0 + 0x1.4484cp-100;
- if (z > 0x1p0)
+ z = 0x1p0f - 0x1.4484cp-100f; /* trigger inexact flag. */
+ if (z >= 0x1p0f) { /* rounding to nearest or upward */
+ z = 0x1p0f + 0x1.4484cp-100f;
+ if (z > 0x1p0f) /* rounding upward */
q += 2;
else
q += (q&1);
--
2.51.0
More information about the Libc-alpha
mailing list