]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Fix log10f on some ABIs
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 7 Nov 2024 10:51:27 +0000 (07:51 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 7 Nov 2024 10:59:43 +0000 (07:59 -0300)
The commit 9247f53219 triggered some regressions on loongarch and
riscv:

math/test-float-log10
math/test-float32-log10

And it is due a wrong sync with CORE-MATH for special 0.0/-0.0
inputs.

Checked on aarch64-linux-gnu and loongarch64-linux-gnu-lp64d.

sysdeps/ieee754/flt-32/e_log10f.c

index 058ce31f095c0300361bf946afcb8b02dabe3baa..03d9e281f374eed834c33485b117cec0b2b6e64b 100644 (file)
@@ -37,9 +37,8 @@ as_special (float x)
     return x; /* +inf */
   uint32_t ax = ux << 1;
   if (ax == 0u)
-    { /* -0.0 */
-      __math_divzerof (1);
-    }
+    /* -0.0 */
+    return  __math_divzerof (1);
   if (ax > 0xff000000u)
     return x + x; /* nan */
   return __math_invalidf (x);