diff --git a/Modelica/Math/nearestInteger.mo b/Modelica/Math/nearestInteger.mo index 8d9e9475b6..bda058567c 100644 --- a/Modelica/Math/nearestInteger.mo +++ b/Modelica/Math/nearestInteger.mo @@ -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)

Note

@@ -42,9 +40,5 @@ Math.nearestInteger(1.39999999999999999+0.1); // = 1 (erroneous border case, see This function does the same conversion as the block RealToInteger.

-

-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. -

")); end nearestInteger;