Skip to content

Commit a51d8fe

Browse files
committed
Address comments
1 parent c30f710 commit a51d8fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/sage/modules/free_module_integer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -918,14 +918,15 @@ def hadamard_ratio(self, use_reduced_basis=True):
918918
919919
sage: from sage.modules.free_module_integer import IntegerLattice
920920
sage: L = IntegerLattice([[101, 0, 0, 0], [0, 101, 0, 0], [0, 0, 101, 0], [-28, 39, 45, 1]], lll_reduce=False)
921-
sage: float(L.hadamard_ratio())
921+
sage: L.hadamard_ratio()
922+
sage: float(L.hadamard_ratio()) # rel tol 1e-13
922923
0.351096481348176
923924
sage: L.LLL()
924925
[ 1 -5 2 18]
925926
[ -5 25 -10 11]
926927
[-17 -16 -34 -3]
927928
[-39 -7 23 5]
928-
sage: float(L.hadamard_ratio())
929+
sage: float(L.hadamard_ratio()) # rel tol 1e-13
929930
0.9933322263147489
930931
"""
931932
if use_reduced_basis:
@@ -957,12 +958,13 @@ def gaussian_heuristic(self, exact_form=False):
957958
958959
sage: from sage.modules.free_module_integer import IntegerLattice
959960
sage: L = IntegerLattice([[101, 0, 0, 0], [0, 101, 0, 0], [0, 0, 101, 0], [-28, 39, 45, 1]])
960-
sage: float(L.gaussian_heuristic())
961+
sage: L.gaussian_heuristic()
962+
sage: float(L.gaussian_heuristic()) # rel tol 1e-13
961963
15.418206247181422
962964
963965
For small `n`, the exact and approximate forms differ significantly::
964966
965-
sage: float(L.gaussian_heuristic(exact_form=True))
967+
sage: float(L.gaussian_heuristic(exact_form=True)) # rel tol 1e-13
966968
21.375859827168494
967969
"""
968970
basis = self.basis_matrix()

0 commit comments

Comments
 (0)