Ticket #4502: trac_4502.patch

File trac_4502.patch, 1.4 KB (added by jason, 13 years ago)
  • sage/matrix/matrix_double_dense.pyx

    # HG changeset patch
    # User Jason Grout <jason-sage@creativetrax.com>
    # Date 1227027371 21600
    # Node ID 57b0a799c5648458a62a81b7516f9e669fc329de
    # Parent  fd4aa404a53e6296179c3dbb79e6e6e5426bab31
    Make a doctest random because it really is (due to numerical issues).
    
    diff -r fd4aa404a53e -r 57b0a799c564 sage/matrix/matrix_double_dense.pyx
    a b  
    427427            answers on similar platforms depending on the hardware
    428428            and tuning options given to ATLAS:
    429429            sage: A = Matrix(RDF, [[1, 0], [0, 0]])
    430             sage: A.inverse().det()
     430            sage: A.inverse().det() # random - on some computers, this will be invertible due to numerical error.
    431431            Traceback (most recent call last):
    432432            ...
    433433            LinAlgError: Singular matrix
     
    438438           
    439439            sage: A.determinant() < 10e-12
    440440            True
    441             sage: ~A              # slightly random
     441            sage: ~A              # random - on some computers, this will not be invertible.
    442442            [-4.50359962737e+15  9.00719925474e+15 -4.50359962737e+15]
    443443            [ 9.00719925474e+15 -1.80143985095e+16  9.00719925474e+15]
    444444            [-4.50359962737e+15  9.00719925474e+15 -4.50359962737e+15]