Lines Matching refs:sgn

199     switch ( sgn )
373 switch ( sgn )
426 if ( sgn == SC_ZERO ) return false;
437 return ( sgn == SC_ZERO ) ? false : true;
485 sgn = get_sign(v);
486 if ( sgn == SC_ZERO ) {
500 sgn = SC_ZERO;
504 sgn = SC_POS;
514 sgn = get_sign(v);
515 if ( sgn == SC_ZERO ) {
529 sgn = SC_ZERO;
533 sgn = SC_POS;
544 sgn = SC_POS;
894 // 3. if sgn(u) == sgn(v)
895 // 3.1 u + v = +(u + v) = sgn(u) * (u + v)
896 // 3.2 (-u) + (-v) = -(u + v) = sgn(u) * (u + v)
897 // 4. if sgn(u) != sgn(v)
898 // 4.1 u + (-v) = u - v = sgn(u) * (u - v)
899 // 4.2 (-u) + v = -(u - v) ==> sgn(u) * (u - v)
903 // 3. u + 1 = u + 1 = sgn(u) * (u + 1)
904 // 4. (-u) + 1 = -(u - 1) = sgn(u) * (u - 1)
910 if (u.sgn == SC_ZERO) // case 1
913 if (v.sgn == SC_ZERO) // case 2
917 return add_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
918 v.sgn, v.nbits, v.ndigits, v.digit);
932 if (u.sgn == SC_ZERO) // case 1
936 return add_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
951 if (v.sgn == SC_ZERO) // case 2
957 v.sgn, v.nbits, v.ndigits, v.digit);
971 if (u.sgn == SC_ZERO) // case 1
975 return add_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
990 if (v.sgn == SC_ZERO) // case 2
995 v.sgn, v.nbits, v.ndigits, v.digit);
1010 // 3. if sgn(u) != sgn(v)
1011 // 3.1 u - (-v) = u + v = sgn(u) * (u + v)
1012 // 3.2 (-u) - v = -(u + v) ==> sgn(u) * (u + v)
1013 // 4. if sgn(u) == sgn(v)
1014 // 4.1 u - v = +(u - v) = sgn(u) * (u - v)
1015 // 4.2 (-u) - (-v) = -(u - v) = sgn(u) * (u - v)
1019 // 3. (-u) - 1 = -(u + 1) = sgn(u) * (u + 1)
1020 // 4. u - 1 = u - 1 = sgn(u) * (u - 1)
1039 small_type s = mul_signs(u.sgn, v.sgn);
1055 small_type s = mul_signs(u.sgn, get_sign(v));
1073 small_type s = mul_signs(v.sgn, get_sign(u));
1091 small_type s = mul_signs(u.sgn, get_sign(v));
1108 small_type s = mul_signs(v.sgn, get_sign(u));
1141 small_type s = mul_signs(u.sgn, v.sgn);
1144 div_by_zero(v.sgn); // case 1
1159 small_type s = mul_signs(u.sgn, get_sign(v));
1179 small_type s = mul_signs(v.sgn, get_sign(u));
1182 div_by_zero(v.sgn); // case 1
1200 small_type s = mul_signs(u.sgn, get_sign(v));
1220 small_type s = mul_signs(v.sgn, get_sign(u));
1223 div_by_zero(v.sgn); // case 1
1256 if ((u.sgn == SC_ZERO) || (v.sgn == SC_ZERO)) {
1257 div_by_zero(v.sgn); // case 1
1262 return mod_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1271 if ((u.sgn == SC_ZERO) || (v == 0)) {
1279 return mod_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1289 if ((u == 0) || (v.sgn == SC_ZERO)) {
1290 div_by_zero(v.sgn); // case 1
1307 if ((u.sgn == SC_ZERO) || (v == 0)) {
1315 return mod_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1325 if ((u == 0) || (v.sgn == SC_ZERO)) {
1326 div_by_zero(v.sgn); // case 1
1348 // 2. u & v => sgn = +
1349 // 3. (-u) & (-v) => sgn = -
1350 // 4. u & (-v) => sgn = +
1351 // 5. (-u) & v => sgn = +
1357 if ((u.sgn == SC_ZERO) || (v.sgn == SC_ZERO)) // case 1
1361 return and_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1362 v.sgn, v.nbits, v.ndigits, v.digit);
1371 if ((u.sgn == SC_ZERO) || (v == 0)) // case 1
1377 return and_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1387 if ((u == 0) || (v.sgn == SC_ZERO)) // case 1
1394 v.sgn, v.nbits, v.ndigits, v.digit);
1403 if ((u.sgn == SC_ZERO) || (v == 0)) // case 1
1409 return and_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1419 if ((u == 0) || (v.sgn == SC_ZERO)) // case 1
1426 v.sgn, v.nbits, v.ndigits, v.digit);
1441 // 3. u | v => sgn = +
1442 // 4. (-u) | (-v) => sgn = -
1443 // 5. u | (-v) => sgn = -
1444 // 6. (-u) | v => sgn = -
1450 if (v.sgn == SC_ZERO) // case 1
1453 if (u.sgn == SC_ZERO) // case 2
1457 return or_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1458 v.sgn, v.nbits, v.ndigits, v.digit);
1472 if (u.sgn == SC_ZERO) // case 2
1476 return or_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1491 if (v.sgn == SC_ZERO)
1496 v.sgn, v.nbits, v.ndigits, v.digit);
1510 if (u.sgn == SC_ZERO) // case 2
1514 return or_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1529 if (v.sgn == SC_ZERO)
1534 v.sgn, v.nbits, v.ndigits, v.digit);
1550 // 3. u ^ v => sgn = +
1551 // 4. (-u) ^ (-v) => sgn = -
1552 // 5. u ^ (-v) => sgn = -
1553 // 6. (-u) ^ v => sgn = +
1559 if (v.sgn == SC_ZERO) // case 1
1562 if (u.sgn == SC_ZERO) // case 2
1566 return xor_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1567 v.sgn, v.nbits, v.ndigits, v.digit);
1581 if (u.sgn == SC_ZERO) // case 2
1585 return xor_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1598 if (v.sgn == SC_ZERO)
1603 v.sgn, v.nbits, v.ndigits, v.digit);
1617 if (u.sgn == SC_ZERO) // case 2
1621 return xor_unsigned_friend(u.sgn, u.nbits, u.ndigits, u.digit,
1634 if (v.sgn == SC_ZERO)
1639 v.sgn, v.nbits, v.ndigits, v.digit);
1661 if ((v.sgn == SC_ZERO) || (v.sgn == SC_NEG))
1679 if ((v.sgn == SC_ZERO) || (v.sgn == SC_NEG))
1710 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1711 v.sgn, v.nbits, v.ndigits, v.digit) != 0)
1720 if (v.sgn == SC_NEG)
1722 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1723 v.sgn, v.nbits, v.ndigits, v.digit, 0, 1) != 0)
1732 if (u.sgn == SC_NEG)
1734 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1735 v.sgn, v.nbits, v.ndigits, v.digit, 1, 0) != 0)
1747 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1761 v.sgn, v.nbits, v.ndigits, v.digit) != 0)
1771 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1783 v.sgn, v.nbits, v.ndigits, v.digit) != 0)
1795 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1809 v.sgn, v.nbits, v.ndigits, v.digit) != 0)
1819 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1831 v.sgn, v.nbits, v.ndigits, v.digit) != 0)
1866 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1867 v.sgn, v.nbits, v.ndigits, v.digit) < 0)
1876 if (v.sgn == SC_NEG)
1878 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1879 v.sgn, v.nbits, v.ndigits, v.digit, 0, 1) < 0)
1888 if (u.sgn == SC_NEG)
1890 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1891 v.sgn, v.nbits, v.ndigits, v.digit, 1, 0) < 0)
1903 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1917 v.sgn, v.nbits, v.ndigits, v.digit) < 0)
1927 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1939 v.sgn, v.nbits, v.ndigits, v.digit) < 0)
1951 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1965 v.sgn, v.nbits, v.ndigits, v.digit) < 0)
1975 if (compare_unsigned(u.sgn, u.nbits, u.ndigits, u.digit,
1987 v.sgn, v.nbits, v.ndigits, v.digit) < 0)
2139 if (sgn == SC_ZERO)
2142 else if (sgn == SC_NEG) {