View | Details | Raw Unified | Return to bug 277783
Collapse All | Expand All

(-)b/lib/msun/src/s_fma.c (-2 / +2 lines)
Lines 260-273 fma(double x, double y, double z) Link Here
260
260
261
	spread = ex + ey;
261
	spread = ex + ey;
262
262
263
	if (r.hi == 0.0) {
263
	if (r.hi == 0.0 && xy.lo == 0) {
264
		/*
264
		/*
265
		 * When the addends cancel to 0, ensure that the result has
265
		 * When the addends cancel to 0, ensure that the result has
266
		 * the correct sign.
266
		 * the correct sign.
267
		 */
267
		 */
268
		fesetround(oround);
268
		fesetround(oround);
269
		volatile double vzs = zs; /* XXX gcc CSE bug workaround */
269
		volatile double vzs = zs; /* XXX gcc CSE bug workaround */
270
		return (xy.hi + vzs + ldexp(xy.lo, spread));
270
		return (xy.hi + vzs);
271
	}
271
	}
272
272
273
	if (oround != FE_TONEAREST) {
273
	if (oround != FE_TONEAREST) {
(-)b/lib/msun/src/s_fmal.c (-2 / +2 lines)
Lines 241-254 fmal(long double x, long double y, long double z) Link Here
241
241
242
	spread = ex + ey;
242
	spread = ex + ey;
243
243
244
	if (r.hi == 0.0) {
244
	if (r.hi == 0.0 && xy.lo == 0) {
245
		/*
245
		/*
246
		 * When the addends cancel to 0, ensure that the result has
246
		 * When the addends cancel to 0, ensure that the result has
247
		 * the correct sign.
247
		 * the correct sign.
248
		 */
248
		 */
249
		fesetround(oround);
249
		fesetround(oround);
250
		volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
250
		volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
251
		return (xy.hi + vzs + ldexpl(xy.lo, spread));
251
		return (xy.hi + vzs);
252
	}
252
	}
253
253
254
	if (oround != FE_TONEAREST) {
254
	if (oround != FE_TONEAREST) {

Return to bug 277783