Lines Matching refs:a_mnt
554 uint16_t a_mnt = FP16_MANT(a);
559 if (fp16_is_signalling_NaN(a_exp, a_mnt))
565 if (fp16_is_NaN(a_exp, a_mnt))
577 uint32_t a_mnt = FP32_MANT(a);
582 if (fp32_is_signalling_NaN(a_exp, a_mnt))
588 if (fp32_is_NaN(a_exp, a_mnt))
600 uint64_t a_mnt = FP64_MANT(a);
605 if (fp64_is_signalling_NaN(a_exp, a_mnt))
611 if (fp64_is_NaN(a_exp, a_mnt))
623 uint16_t a_mnt = FP16_MANT(a);
630 if (fp16_is_signalling_NaN(a_exp, a_mnt))
638 if (fp16_is_NaN(a_exp, a_mnt))
652 uint32_t a_mnt = FP32_MANT(a);
659 if (fp32_is_signalling_NaN(a_exp, a_mnt))
667 if (fp32_is_NaN(a_exp, a_mnt))
681 uint64_t a_mnt = FP64_MANT(a);
688 if (fp64_is_signalling_NaN(a_exp, a_mnt))
696 if (fp64_is_NaN(a_exp, a_mnt))
948 uint16_t a_mnt, b_mnt;
950 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
953 if (fp16_is_NaN(a_exp, a_mnt) ||
955 if (fp16_is_signalling_NaN(a_exp, a_mnt) ||
960 return a == b || (!a_mnt && !b_mnt);
967 uint16_t a_mnt, b_mnt;
969 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
972 if (fp16_is_NaN(a_exp, a_mnt) ||
977 if (!a_mnt && !b_mnt)
983 if (a_mnt != b_mnt)
984 return a_sgn ^ (a_mnt > b_mnt);
992 uint16_t a_mnt, b_mnt;
994 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
997 if (fp16_is_NaN(a_exp, a_mnt) ||
1002 if (!a_mnt && !b_mnt)
1008 if (a_mnt != b_mnt)
1009 return a_sgn ^ (a_mnt > b_mnt);
1017 uint16_t a_mnt, b_mnt;
1019 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1022 if (fp16_is_NaN(a_exp, a_mnt) ||
1024 if (fp16_is_signalling_NaN(a_exp, a_mnt) ||
1036 uint32_t a_mnt, b_mnt;
1038 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1041 if (fp32_is_NaN(a_exp, a_mnt) ||
1043 if (fp32_is_signalling_NaN(a_exp, a_mnt) ||
1048 return a == b || (!a_mnt && !b_mnt);
1055 uint32_t a_mnt, b_mnt;
1057 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1060 if (fp32_is_NaN(a_exp, a_mnt) ||
1065 if (!a_mnt && !b_mnt)
1071 if (a_mnt != b_mnt)
1072 return a_sgn ^ (a_mnt > b_mnt);
1080 uint32_t a_mnt, b_mnt;
1082 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1085 if (fp32_is_NaN(a_exp, a_mnt) ||
1090 if (!a_mnt && !b_mnt)
1096 if (a_mnt != b_mnt)
1097 return a_sgn ^ (a_mnt > b_mnt);
1105 uint32_t a_mnt, b_mnt;
1107 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1110 if (fp32_is_NaN(a_exp, a_mnt) ||
1112 if (fp32_is_signalling_NaN(a_exp, a_mnt) ||
1124 uint64_t a_mnt, b_mnt;
1126 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1129 if (fp64_is_NaN(a_exp, a_mnt) ||
1131 if (fp64_is_signalling_NaN(a_exp, a_mnt) ||
1136 return a == b || (!a_mnt && !b_mnt);
1143 uint64_t a_mnt, b_mnt;
1145 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1148 if (fp64_is_NaN(a_exp, a_mnt) ||
1153 if (!a_mnt && !b_mnt)
1159 if (a_mnt != b_mnt)
1160 return a_sgn ^ (a_mnt > b_mnt);
1168 uint64_t a_mnt, b_mnt;
1170 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1173 if (fp64_is_NaN(a_exp, a_mnt) ||
1178 if (!a_mnt && !b_mnt)
1184 if (a_mnt != b_mnt)
1185 return a_sgn ^ (a_mnt > b_mnt);
1193 uint64_t a_mnt, b_mnt;
1195 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1198 if (fp64_is_NaN(a_exp, a_mnt) ||
1200 if (fp64_is_signalling_NaN(a_exp, a_mnt) ||
1212 uint16_t a_mnt, b_mnt, x, x_mnt;
1214 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1231 } else if (!a_mnt && !b_mnt && a_sgn == b_sgn) {
1235 a_mnt <<= 3;
1242 a_mnt = (lsr16(a_mnt, b_exp - a_exp) |
1243 !!(a_mnt & (lsl16(1, b_exp - a_exp) - 1)));
1249 x_mnt = a_mnt + b_mnt;
1250 } else if (a_mnt >= b_mnt) {
1251 x_mnt = a_mnt - b_mnt;
1254 x_mnt = b_mnt - a_mnt;
1272 uint32_t a_mnt, b_mnt, x, x_mnt;
1274 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1291 } else if (!a_mnt && !b_mnt && a_sgn == b_sgn) {
1295 a_mnt <<= 3;
1302 a_mnt = (lsr32(a_mnt, b_exp - a_exp) |
1303 !!(a_mnt & (lsl32(1, b_exp - a_exp) - 1)));
1309 x_mnt = a_mnt + b_mnt;
1310 } else if (a_mnt >= b_mnt) {
1311 x_mnt = a_mnt - b_mnt;
1314 x_mnt = b_mnt - a_mnt;
1332 uint64_t a_mnt, b_mnt, x, x_mnt;
1334 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1351 } else if (!a_mnt && !b_mnt && a_sgn == b_sgn) {
1355 a_mnt <<= 3;
1362 a_mnt = (lsr64(a_mnt, b_exp - a_exp) |
1363 !!(a_mnt & (lsl64(1, b_exp - a_exp) - 1)));
1369 x_mnt = a_mnt + b_mnt;
1370 } else if (a_mnt >= b_mnt) {
1371 x_mnt = a_mnt - b_mnt;
1374 x_mnt = b_mnt - a_mnt;
1392 uint16_t a_mnt, b_mnt, x;
1395 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1404 (b_exp == FP16_EXP_INF && !a_mnt)) {
1409 } else if (!a_mnt || !b_mnt) {
1416 x_mnt = (uint32_t)a_mnt * b_mnt;
1429 uint32_t a_mnt, b_mnt, x;
1432 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1441 (b_exp == FP32_EXP_INF && !a_mnt)) {
1446 } else if (!a_mnt || !b_mnt) {
1453 x_mnt = (uint64_t)a_mnt * b_mnt;
1466 uint64_t a_mnt, b_mnt, x;
1469 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1478 (b_exp == FP64_EXP_INF && !a_mnt)) {
1483 } else if (!a_mnt || !b_mnt) {
1490 mul62x62(&x0_mnt, &x1_mnt, a_mnt, b_mnt);
1504 uint16_t a_mnt, b_mnt, c_mnt, x;
1507 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1514 if (fp16_is_quiet_NaN(a_exp, a_mnt) &&
1538 if (!a_mnt && (!b_mnt || !c_mnt) && a_sgn == (b_sgn ^ c_sgn))
1543 x_mnt = (uint32_t)a_mnt << (FP16_MANT_BITS + 4);
1589 uint32_t a_mnt, b_mnt, c_mnt, x;
1592 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1599 if (fp32_is_quiet_NaN(a_exp, a_mnt) &&
1623 if (!a_mnt && (!b_mnt || !c_mnt) && a_sgn == (b_sgn ^ c_sgn))
1628 x_mnt = (uint64_t)a_mnt << (FP32_MANT_BITS + 4);
1674 uint64_t a_mnt, b_mnt, c_mnt, x;
1677 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1684 if (fp64_is_quiet_NaN(a_exp, a_mnt) &&
1708 if (!a_mnt && (!b_mnt || !c_mnt) && a_sgn == (b_sgn ^ c_sgn))
1714 x1_mnt = a_mnt;
1765 uint16_t a_mnt, b_mnt, x;
1768 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1776 (!a_mnt && !b_mnt)) {
1785 if (!a_mnt || b_exp == FP16_EXP_INF)
1789 a_mnt = fp16_normalise(a_mnt, &a_exp);
1792 x_mnt = ((uint32_t)a_mnt << (FP16_MANT_BITS - FP16_EXP_BITS + 3)) / b_mnt;
1794 (uint32_t)a_mnt << (FP16_MANT_BITS - FP16_EXP_BITS + 3));
1807 uint32_t a_mnt, b_mnt, x;
1810 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1818 (!a_mnt && !b_mnt)) {
1827 if (!a_mnt || b_exp == FP32_EXP_INF)
1831 a_mnt = fp32_normalise(a_mnt, &a_exp);
1834 x_mnt = ((uint64_t)a_mnt << (FP32_MANT_BITS - FP32_EXP_BITS + 3)) / b_mnt;
1836 (uint64_t)a_mnt << (FP32_MANT_BITS - FP32_EXP_BITS + 3));
1849 uint64_t a_mnt, b_mnt, x, x_mnt, x0_mnt, x1_mnt;
1851 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1859 (!a_mnt && !b_mnt)) {
1868 if (!a_mnt || b_exp == FP64_EXP_INF)
1872 a_mnt = fp64_normalise(a_mnt, &a_exp);
1884 mul62x62(&x0_mnt, &x1_mnt, x0_mnt, a_mnt >> 2);
1890 c = cmp128(x0_mnt, x1_mnt, 0, a_mnt >> 11);
1927 uint16_t a_mnt;
1929 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1932 if (fp16_is_NaN(a_exp, a_mnt)) {
1937 if (!a_mnt) {
1949 a_mnt <<= 3;
1951 a_mnt = fp16_normalise(a_mnt, &a_exp);
1953 return fp16_round(a_sgn, a_exp + FP16_EXP_BITS - 3, a_mnt << 1,
1961 uint32_t a_mnt;
1963 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
1966 if (fp32_is_NaN(a_exp, a_mnt)) {
1971 if (!a_mnt) {
1983 a_mnt <<= 3;
1985 a_mnt = fp32_normalise(a_mnt, &a_exp);
1987 return fp32_round(a_sgn, a_exp + FP32_EXP_BITS - 3, a_mnt << 1,
1995 uint64_t a_mnt;
1997 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
2000 if (fp64_is_NaN(a_exp, a_mnt)) {
2005 if (!a_mnt) {
2017 a_mnt <<= 3;
2019 a_mnt = fp64_normalise(a_mnt, &a_exp);
2021 return fp64_round(a_sgn, a_exp + FP64_EXP_BITS - 3, a_mnt << 1,
2029 uint16_t a_mnt, x_mnt;
2032 fp16_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
2035 if (fp16_is_NaN(a_exp, a_mnt))
2039 if (!a_mnt)
2048 a_mnt = fp16_normalise(a_mnt, &a_exp);
2051 a_mnt >>= 1;
2055 x = ((uint32_t)a_mnt << 14) + ((uint32_t)a_mnt << 13) + ((uint32_t)5 << 28);
2058 x = (((uint32_t)a_mnt << 16) / (x >> 15) + (x >> 16)) << 15;
2061 x = (((uint32_t)a_mnt << 16) / (x >> 15) + (x >> 16)) << 15;
2067 t0 = (uint32_t)a_mnt << 9;
2081 uint32_t a_mnt, x, x_mnt;
2084 fp32_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
2087 if (fp32_is_NaN(a_exp, a_mnt))
2091 if (!a_mnt)
2100 a_mnt = fp32_normalise(a_mnt, &a_exp);
2103 a_mnt >>= 1;
2107 x = (a_mnt >> 2) + (a_mnt >> 3) + ((uint32_t)5 << 28);
2110 x = (a_mnt / (x >> 15) + (x >> 16)) << 15;
2113 x = (a_mnt / (x >> 15) + (x >> 16)) << 15;
2116 x = ((((uint64_t)a_mnt << 32) / x) >> 2) + (x >> 1);
2122 t0 = (uint64_t)a_mnt << 19;
2136 uint64_t a_mnt, x_mnt, r, x0, x1;
2139 fp64_unpack(&a_sgn, &a_exp, &a_mnt, a, mode, flags);
2142 if (fp64_is_NaN(a_exp, a_mnt))
2146 if (!a_mnt)
2155 a_mnt = fp64_normalise(a_mnt, &a_exp);
2158 a_mnt >>= 1;
2162 x = (a_mnt >> 34) + (a_mnt >> 35) + ((uint32_t)5 << 28);
2165 x = ((a_mnt >> 32) / (x >> 15) + (x >> 16)) << 15;
2168 x = ((a_mnt >> 32) / (x >> 15) + (x >> 16)) << 15;
2171 x = ((a_mnt / x) >> 2) + (x >> 1);
2181 mul62x62(&x0, &x1, a_mnt >> 10, x0 >> 2);
2193 c = cmp128(x0, x1, 0, a_mnt);