Description
The
ring of
M determines the default strategy. If the ring is a
polynomial ring or a field (as identified by
isField) then the
Bareiss algorithm is used. If the ring is a
quotient ring (which has not been declared a field by
toField), then the
Cofactor algorithm is used.The
Dynamic algorithm implements a variant of cofactor expansion that caches intermediate results. This strategy introduces some memory overhead, but can be faster than
Cofactor, especially with sparse matrices of low degree.
Caveat
The
Bareiss algorithm returns a ring element that may differ from the actual determinant by a zero divisor in the ring. Thus, an
incorrect answer may be computed if the ring contains zero divisors.