Skip to content

Commit

Permalink
Revert "libm: fma: correct zero sign with small inputs"
Browse files Browse the repository at this point in the history
This change introduced a test failure, so revert until that can be
addressed.

This reverts commit 888796a.

PR:		277783
Reported by:	rlibby
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
emaste committed Jun 12, 2024
1 parent 92927b8 commit e77ad95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/msun/src/s_fma.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ fma(double x, double y, double z)
*/
fesetround(oround);
volatile double vzs = zs; /* XXX gcc CSE bug workaround */
xs = ldexp(xy.lo, spread);
xy.hi += vzs;
return (xy.hi == 0 ? xs : xy.hi + xs);
return (xy.hi + vzs + ldexp(xy.lo, spread));
}

if (oround != FE_TONEAREST) {
Expand Down
4 changes: 1 addition & 3 deletions lib/msun/src/s_fmal.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ fmal(long double x, long double y, long double z)
*/
fesetround(oround);
volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
xs = ldexpl(xy.lo, spread);
xy.hi += vzs;
return (xy.hi == 0 ? xs : xy.hi + xs);
return (xy.hi + vzs + ldexpl(xy.lo, spread));
}

if (oround != FE_TONEAREST) {
Expand Down

0 comments on commit e77ad95

Please sign in to comment.