File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ Math.<strong>nearestInteger</strong>(r);
1717
1818<h4>Description</h4>
1919<p>
20- The input value \" r\" of type Real is converted to the closest Integer value \" i\",
21- using the <i >round half away from zero</i > rule with the equation:
20+ The input value \" r\" of type Real is converted to the closest Integer value \" i\",
21+ using the <em >round half away from zero</em > rule with the equation:
2222</p>
2323<blockquote><pre>
2424i = <strong>integer</strong>( <strong>floor</strong>( r + 0.5 ) ) for r > 0;
@@ -33,7 +33,7 @@ Math.nearestInteger(0.5); // = 1
3333Math.nearestInteger(-0.4); // = 0
3434Math.nearestInteger(-0.5); // = -1
3535Math.nearestInteger(0.3999999999999999+0.1); // = 0
36- Math.nearestInteger(1.39999999999999999+0.1); // = 1 (errorneous border case, see note below)
36+ Math.nearestInteger(1.39999999999999999+0.1); // = 1 (erroneous border case, see note below)
3737</pre></blockquote>
3838
3939<h4>Note</h4>
You can’t perform that action at this time.
0 commit comments