From 5c4e7080b1f6f92278aac95279fe0545bb70768f Mon Sep 17 00:00:00 2001 From: Thomas Beutlich Date: Thu, 29 Oct 2020 20:03:02 +0100 Subject: [PATCH] Remove documentation of border cases --- Modelica/Math/nearestInteger.mo | 6 ------ 1 file changed, 6 deletions(-) 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;