This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/17967] [powerpc] sqrtf inaccurate results (non-default rounding modes) / exceptions
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 13 Feb 2015 16:21:53 +0000
- Subject: [Bug math/17967] [powerpc] sqrtf inaccurate results (non-default rounding modes) / exceptions
- Auto-submitted: auto-generated
- References: <bug-17967-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17967
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 95c26233a1c7dd73a852a4f3bffd2d2eeba5e2fd (commit)
from 3f293d614c9e641a0d96d347df5c1c5ee687762f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=95c26233a1c7dd73a852a4f3bffd2d2eeba5e2fd
commit 95c26233a1c7dd73a852a4f3bffd2d2eeba5e2fd
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Feb 13 16:20:36 2015 +0000
Fix powerpc software sqrtf (bug 17967).
Similarly to sqrt in
<https://sourceware.org/ml/libc-alpha/2015-02/msg00353.html>, the
powerpc sqrtf implementation for when _ARCH_PPCSQ is not defined also
relies on a * b + c being contracted into a fused multiply-add.
Although this contraction is not explicitly disabled for e_sqrtf.c, it
still seems appropriate to make the file explicit about its
requirements by using __builtin_fmaf; this patch does so.
Furthermore, it turns out that doing so fixes the observed inaccuracy
and missing exceptions (that is, that without explicit __builtin_fmaf
usage, it was not being compiled as intended).
Tested for powerpc32 (hard float).
[BZ #17967]
* sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Use
__builtin_fmaf instead of relying on contraction of a * b + c.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
NEWS | 2 +-
sysdeps/powerpc/fpu/e_sqrtf.c | 24 +++++++++++++-----------
3 files changed, 20 insertions(+), 12 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.