Lines Matching +full:x +full:- +full:z

1 // SPDX-License-Identifier: GPL-2.0-only
5 * MADDF.fmt: FPR[fd] = FPR[fd] + (FPR[fs] x FPR[ft])
28 *lptr = *hptr >> (count - 64); in srl128()
29 *lptr |= (*hptr << (128 - count)) != 0 || low != 0; in srl128()
34 *lptr = low >> count | *hptr << (64 - count); in srl128()
35 *lptr |= (low << (64 - count)) != 0; in srl128()
40 static union ieee754dp _dp_maddf(union ieee754dp z, union ieee754dp x, in _dp_maddf() argument
78 * Handle the cases when at least one of x, y or z is a NaN. in _dp_maddf()
79 * Order of precedence is sNaN, qNaN and z, x, y. in _dp_maddf()
82 return ieee754dp_nanxcpt(z); in _dp_maddf()
84 return ieee754dp_nanxcpt(x); in _dp_maddf()
88 return z; in _dp_maddf()
90 return x; in _dp_maddf()
96 /* ZERO z cases are handled separately below */ in _dp_maddf()
122 * z is here either not an infinity, or an infinity having the in _dp_maddf()
123 * same sign as product (x*y). The result must be an infinity, in _dp_maddf()
124 * and its sign is determined only by the sign of product (x*y). in _dp_maddf()
136 /* Handle cases +0 + (-0) and similar ones. */ in _dp_maddf()
142 * such case determined only by the sign of z. in _dp_maddf()
144 return z; in _dp_maddf()
148 /* x*y is here 0, and z is not 0, so just return z */ in _dp_maddf()
149 return z; in _dp_maddf()
187 xm <<= 64 - (DP_FBITS + 1); in _dp_maddf()
188 ym <<= 64 - (DP_FBITS + 1); in _dp_maddf()
233 srl128(&hrm, &lrm, (126 - 55)); in _dp_maddf()
247 s = ze - re; in _dp_maddf()
252 * Have to shift x fraction right to align. in _dp_maddf()
254 s = re - ze; in _dp_maddf()
275 hzm = hzm - hrm - (lzm < lrm); in _dp_maddf()
276 lzm = lzm - lrm; in _dp_maddf()
278 hzm = hrm - hzm - (lrm < lzm); in _dp_maddf()
279 lzm = lrm - lzm; in _dp_maddf()
294 ze -= 63; in _dp_maddf()
298 ze -= 64; in _dp_maddf()
303 while ((hzm >> (62 - t)) == 0) in _dp_maddf()
308 hzm = hzm << t | lzm >> (64 - t); in _dp_maddf()
310 ze -= t; in _dp_maddf()
319 srl128(&hzm, &lzm, (126 - 55)); in _dp_maddf()
324 union ieee754dp ieee754dp_maddf(union ieee754dp z, union ieee754dp x, in ieee754dp_maddf() argument
327 return _dp_maddf(z, x, y, 0); in ieee754dp_maddf()
330 union ieee754dp ieee754dp_msubf(union ieee754dp z, union ieee754dp x, in ieee754dp_msubf() argument
333 return _dp_maddf(z, x, y, MADDF_NEGATE_PRODUCT); in ieee754dp_msubf()
336 union ieee754dp ieee754dp_madd(union ieee754dp z, union ieee754dp x, in ieee754dp_madd() argument
339 return _dp_maddf(z, x, y, 0); in ieee754dp_madd()
342 union ieee754dp ieee754dp_msub(union ieee754dp z, union ieee754dp x, in ieee754dp_msub() argument
345 return _dp_maddf(z, x, y, MADDF_NEGATE_ADDITION); in ieee754dp_msub()
348 union ieee754dp ieee754dp_nmadd(union ieee754dp z, union ieee754dp x, in ieee754dp_nmadd() argument
351 return _dp_maddf(z, x, y, MADDF_NEGATE_PRODUCT|MADDF_NEGATE_ADDITION); in ieee754dp_nmadd()
354 union ieee754dp ieee754dp_nmsub(union ieee754dp z, union ieee754dp x, in ieee754dp_nmsub() argument
357 return _dp_maddf(z, x, y, MADDF_NEGATE_PRODUCT); in ieee754dp_nmsub()