diff --git a/exercises/practice/rational-numbers/src/test/java/RationalTest.java b/exercises/practice/rational-numbers/src/test/java/RationalTest.java index 7eb882688..9f90d4457 100644 --- a/exercises/practice/rational-numbers/src/test/java/RationalTest.java +++ b/exercises/practice/rational-numbers/src/test/java/RationalTest.java @@ -8,10 +8,10 @@ public class RationalTest { // Helper methods - private static final double DOUBLE_EQUALITY_TOLERANCE = 1e-15; + private static final double DOUBLE_EQUALITY_TOLERANCE = 2e-15; private void assertDoublesEqual(double x, double y) { - assertThat(x).isEqualTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); + assertThat(x).isCloseTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); } // Tests