@@ -1464,6 +1464,62 @@ Conversions
14641464 It is not defined for NaNs, infinities, or values for which the result is out of range.
14651465
14661466
1467+ .. _op-trunc_u_sat :
1468+
1469+ :math: `\truncusat _{M,N}(z)`
1470+ ...........................
1471+
1472+ * If :math: `z` is a NaN, then return :math: `0 `.
1473+
1474+ * Else if :math: `z` is negative infinity, then return :math: `0 `.
1475+
1476+ * Else if :math: `z` is positive infinity, then return :math: `2 ^N - 1 `.
1477+
1478+ * Else if :math: `\trunc (z)` is less than :math: `0 `, then return :math: `0 `.
1479+
1480+ * Else if :math: `\trunc (z)` is greater than :math: `2 ^N - 1 `, then return :math: `2 ^N - 1 `.
1481+
1482+ * Else, return :math: `\trunc (z)`.
1483+
1484+ .. math ::
1485+ \begin {array}{lll@{\qquad }l}
1486+ \truncusat _{M,N}(\pm \NAN (n)) &=& 0 \\
1487+ \truncusat _{M,N}(- \infty ) &=& 0 \\
1488+ \truncusat _{M,N}(+ \infty ) &=& 2 ^N - 1 \\
1489+ \truncusat _{M,N}(- q) &=& 0 & (\iff \trunc (- q) < 0 ) \\
1490+ \truncusat _{M,N}(+ q) &=& 2 ^N - 1 & (\iff \trunc (+ q) > 2 ^N - 1 ) \\
1491+ \truncusat _{M,N}(\pm q) &=& \trunc (\pm q) & (otherwise) \\
1492+ \end {array}
1493+
1494+
1495+ .. _op-trunc_s_sat :
1496+
1497+ :math: `\truncssat _{M,N}(z)`
1498+ ...........................
1499+
1500+ * If :math: `z` is a NaN, then return :math: `0 `.
1501+
1502+ * Else if :math: `z` is negative infinity, then return :math: `-2 ^{N-1 }`.
1503+
1504+ * Else if :math: `z` is positive infinity, then return :math: `2 ^{N-1 } - 1 `.
1505+
1506+ * Else if :math: `\trunc (z)` is less than :math: `-2 ^{N-1 }`, then return :math: `-2 ^{N-1 }`.
1507+
1508+ * Else if :math: `\trunc (z)` is greater than :math: `2 ^{N-1 } - 1 `, then return :math: `2 ^{N-1 } - 1 `.
1509+
1510+ * Else, return :math: `\trunc (z)`.
1511+
1512+ .. math ::
1513+ \begin {array}{lll@{\qquad }l}
1514+ \truncssat _{M,N}(\pm \NAN (n)) &=& 0 \\
1515+ \truncssat _{M,N}(- \infty ) &=& -2 ^{N-1 } \\
1516+ \truncssat _{M,N}(+ \infty ) &=& 2 ^{N-1 }-1 \\
1517+ \truncssat _{M,N}(- q) &=& -2 ^{N-1 } & (\iff \trunc (- q) < -2 ^{N-1 }) \\
1518+ \truncssat _{M,N}(+ q) &=& 2 ^{N-1 } - 1 & (\iff \trunc (+ q) > 2 ^{N-1 } - 1 ) \\
1519+ \truncssat _{M,N}(\pm q) &=& \trunc (\pm q) & (otherwise) \\
1520+ \end {array}
1521+
1522+
14671523 .. _op-promote :
14681524
14691525:math: `\promote _{M,N}(z)`
0 commit comments