diff --git a/hipparchus-core/src/main/java/org/hipparchus/analysis/polynomials/SmoothStepFactory.java b/hipparchus-core/src/main/java/org/hipparchus/analysis/polynomials/SmoothStepFactory.java index 32973e160..32f7d8ec4 100644 --- a/hipparchus-core/src/main/java/org/hipparchus/analysis/polynomials/SmoothStepFactory.java +++ b/hipparchus-core/src/main/java/org/hipparchus/analysis/polynomials/SmoothStepFactory.java @@ -209,9 +209,9 @@ private static int pascalTriangle(final int k, final int n) { * @throws MathIllegalArgumentException if input is not between [0:1] */ public static void checkBetweenZeroAndOneIncluded(final double input) throws MathIllegalArgumentException { - if (input < 0 || input > 1) { - throw new MathIllegalArgumentException( - LocalizedCoreFormats.INPUT_EXPECTED_BETWEEN_ZERO_AND_ONE_INCLUDED); + if (input < 0 - 1E-10 || input > 1 + 1E-10) { + throw new MathIllegalArgumentException( + LocalizedCoreFormats.INPUT_EXPECTED_BETWEEN_ZERO_AND_ONE_INCLUDED, input); } }