Skip to content

Commit

Permalink
fix floating point accurcy
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiener committed Aug 28, 2024
1 parent a2d6b54 commit 3c01ef0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/optlang/tests/test_glpk_exact_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_get_primal(self):
-1.1331887079263237e-29, 17.530865429786694, 0.0, 0.0, 0.0, 4.765319193197458,
-4.765319193197457, 21.79949265599876, -21.79949265599876, -3.2148950476847613, 0.0,
-2.281503094067127, 2.6784818505075303, 0.0]):
self.assertAlmostEqual(i, j)
self.assertAlmostEqual(i, j, places=6)

def test_changing_variable_names_is_reflected_in_the_solver(self):
model = self.interface.Model(problem=glpk_read_cplex(TESTMODELPATH))
Expand Down
2 changes: 1 addition & 1 deletion src/optlang/tests/test_glpk_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_get_primal(self):
-1.1331887079263237e-29, 17.530865429786694, 0.0, 0.0, 0.0, 4.765319193197458,
-4.765319193197457, 21.79949265599876, -21.79949265599876, -3.2148950476847613, 0.0,
-2.281503094067127, 2.6784818505075303, 0.0]):
self.assertAlmostEqual(i, j)
self.assertAlmostEqual(i, j, places=6)

def test_changing_variable_names_is_reflected_in_the_solver(self):
model = self.interface.Model(problem=glpk_read_cplex(TESTMODELPATH))
Expand Down

0 comments on commit 3c01ef0

Please sign in to comment.