Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove documentation of border cases
Browse files Browse the repository at this point in the history
beutlich committed Nov 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7f9f10d commit 5c4e708
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Modelica/Math/nearestInteger.mo
Original file line number Diff line number Diff line change
@@ -32,8 +32,6 @@ Math.nearestInteger(0.4); // = 0
Math.nearestInteger(0.5); // = 1
Math.nearestInteger(-0.4); // = 0
Math.nearestInteger(-0.5); // = -1
Math.nearestInteger(0.3999999999999999+0.1); // = 0
Math.nearestInteger(1.39999999999999999+0.1); // = 1 (erroneous border case, see note below)
</pre></blockquote>
<h4>Note</h4>
@@ -42,9 +40,5 @@ Math.nearestInteger(1.39999999999999999+0.1); // = 1 (erroneous border case, see
This function does the same conversion as the block
<a href=\"modelica://Modelica.Blocks.Math.RealToInteger\">RealToInteger</a>.
</p>
<p>
The underlying equation is simple, but not always correct. Due to floating point arithmetic some border cases
are not converted correct, like shown in the example above.
</p>
</html>"));
end nearestInteger;

0 comments on commit 5c4e708

Please sign in to comment.