Skip to content

Commit 353a031

Browse files
committed
Trying to tests pass on the gate.
1 parent 95ca920 commit 353a031

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ def executeFnTest(self, values, fn, fnName):
13031303
self.assertTrue(math.isnan(result), "Test2 fail: {}({}) = {}, but was {}".format(fnName, value[0], expected, result))
13041304
else :
13051305
if result != expected:
1306-
self.assertTrue(math.isclose(result, expected, rel_tol=1e-14), "Test3 fail: {}({}) = {}, but was {}".format(fnName, value[0], expected, result))
1306+
self.assertTrue(math.isclose(result, expected, rel_tol=1e-12), "Test3 fail: {}({}) = {}, but was {}".format(fnName, value[0], expected, result))
13071307

13081308
def test_erf(self):
13091309
erfValues = [(0.0, 0.0), (-0.0, -0.0), (INF, 1.0), (NINF, -1.0), (NAN, NAN),

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MathModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ public double doIt(Object iterable,
10751075
y = lo * 2.0;
10761076
x = hi + y;
10771077
yr = x - hi;
1078-
if (y == yr) {
1078+
if (BigDecimal.valueOf(y).compareTo(BigDecimal.valueOf(yr)) == 0) {
10791079
hi = x;
10801080
}
10811081
}

0 commit comments

Comments
 (0)