Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Round towards positive infinity means the result of the rounding is never smaller than the argument.<br> Round towards negative infinity means the result of the rounding is never larger than the argument.<br> Round to nearest, ties to even means the result of rounding is sometimes larger, sometimes smaller than (and sometimes equal to) the argument.</p> <p>Rounding the value <code>+0.100101110</code> to six places after the binary point would result in</p> <pre><code>+0.100110 // for round towards positive infinity +0.100101 // for round towards negative infinity +0.100110 // for round to nearest, ties to even </code></pre> <p>The value is split</p> <pre><code>+0.100101 110 </code></pre> <p>into the bits to be kept and the bits determining the result of the rounding.</p> <p>Since the value is positive and the determining bits are not all 0, rounding towards positive infinity means incrementing the kept part by 1 ULP.</p> <p>Since the value is positive, rounding towards negative infinity simply discards the last bits.</p> <p>Since the first cut off bit is 1 and not all further bits are 0, the value <code>+0.100110</code> is closer to the original than <code>+0.100101</code>, so the result is <code>+0.100110</code>.</p> <p>More instructive for the nearest/even case would be an example or two where we actually have a tie, e.g. round <code>+0.1001</code> to three bits after the binary point:</p> <pre><code>+0.100 1 // halfway between +0.100 and +0.101 </code></pre> <p>here, the rule says to pick the one with last bit 0 (last bit even) of the two closest values, i.e. <code>+0.100</code> and this value is rounded towards negative infinity. But rounding <code>+0.1011</code> would round towards positive infinity, because this time the larger of the two closest values has last bit 0.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload