@@ -66,6 +66,9 @@ from sage.libs.linbox.linbox cimport Linbox_integer_dense
66
66
cdef Linbox_integer_dense linbox
67
67
linbox = Linbox_integer_dense()
68
68
69
+ import sage.misc.misc
70
+ USE_LINBOX_POLY = not sage.misc.misc.is_64bit()
71
+
69
72
cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
70
73
r """
71
74
Matrix over the integers.
@@ -661,7 +664,8 @@ cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
661
664
algorithm -- 'linbox' (default)
662
665
'generic'
663
666
664
- NOTE: Linbox only used on Darwin OS X right now.
667
+ NOTE: Linbox charpoly disabled on 64-bit machines, since it
668
+ hangs in many cases.
665
669
666
670
EXAMPLES:
667
671
sage: A = matrix(ZZ,6, range(36))
@@ -679,6 +683,9 @@ cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
679
683
x = self .fetch(key)
680
684
if x: return x
681
685
686
+ if algorithm == ' linbox' and not USE_LINBOX_POLY:
687
+ algorithm = ' generic'
688
+
682
689
if algorithm == ' linbox' :
683
690
g = self ._charpoly_linbox(var)
684
691
elif algorithm == ' generic' :
@@ -696,7 +703,8 @@ cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
696
703
algorithm -- 'linbox' (default)
697
704
'generic'
698
705
699
- NOTE: Linbox only used on Darwin OS X right now.
706
+ NOTE: Linbox charpoly disabled on 64-bit machines, since it
707
+ hangs in many cases.
700
708
701
709
EXAMPLES:
702
710
sage: A = matrix(ZZ,6, range(36))
@@ -710,6 +718,9 @@ cdef class Matrix_integer_dense(matrix_dense.Matrix_dense): # dense or sparse
710
718
x = self .fetch(key)
711
719
if x: return x
712
720
721
+ if algorithm == ' linbox' and not USE_LINBOX_POLY:
722
+ algorithm = ' generic'
723
+
713
724
if algorithm == ' linbox' :
714
725
g = self ._minpoly_linbox(var)
715
726
elif algorithm == ' generic' :
0 commit comments