diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-11-07 07:51:27 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-11-07 07:59:43 -0300 |
commit | 12b8dd77182420917a8efdaca03a5e3d77a127f5 (patch) | |
tree | cb0397478b906243c6fc3219eabc8e1a1d762712 | |
parent | 11a2169e4066e6b848f1e6e4c31ec4e2210cecd8 (diff) | |
download | glibc-12b8dd77182420917a8efdaca03a5e3d77a127f5.zip glibc-12b8dd77182420917a8efdaca03a5e3d77a127f5.tar.gz glibc-12b8dd77182420917a8efdaca03a5e3d77a127f5.tar.bz2 |
math: Fix log10f on some ABIs
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.
-rw-r--r-- | sysdeps/ieee754/flt-32/e_log10f.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c index 058ce31..03d9e28 100644 --- a/sysdeps/ieee754/flt-32/e_log10f.c +++ b/sysdeps/ieee754/flt-32/e_log10f.c @@ -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); |