Skip to content

Commit 01b8478

Browse files
changes the precision for the tests
1 parent 2d75811 commit 01b8478

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Maths/test/RungaKutta.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ describe('rungeKuttaStep', () => {
66
rungeKuttaStep(0, 0.1, 1, function (x, y) {
77
return Math.sin(x) + y;
88
})
9-
).toBeCloseTo(1.10517, 4);
9+
).toBeCloseTo(1.10517, 3);
1010
});
1111

1212
it('should calculate the next y value correctly for exponential function', () => {
1313
expect(
1414
rungeKuttaStep(0.5, 0.1, 1, function (x, y) {
1515
return Math.exp(x) - y;
1616
})
17-
).toBeCloseTo(1.15233, 4);
17+
).toBeCloseTo(1.15233, 3);
1818
});
1919
});
2020

@@ -44,7 +44,7 @@ describe('rungeKuttaFull', () => {
4444
{ x: 0.25, y: 1.24757 },
4545
{ x: 0.5, y: 1.48211 },
4646
{ x: 0.75, y: 1.69491 },
47-
{ x: 1, y: 1.88159 }
47+
{ x: 1, y: 1.88159 }
4848
]);
4949
});
5050
});

0 commit comments

Comments
 (0)