Ticket #7852: trac_7852-fix_noisy_zero_error_in_matrix_double_dense.reviewer.patch

File trac_7852-fix_noisy_zero_error_in_matrix_double_dense.reviewer.patch, 846 bytes (added by leif, 10 years ago)

Reviewer patch. Apply on top of main patch, which causes another doctest to fail on a couple of systems due to a noisy zero in a vector result.

  • sage/matrix/matrix_double_dense.pyx

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1317004206 14400
    # Node ID 470faaed89466ccf6ec8e6741007eb6d75e17daf
    # Parent  6f081ebdc3d4554875fc0b58044312aac99cf8dc
    #7852 Reviewer patch: Fix doctest error due to noisy zero of a vector in matrix_double_dense.
    
    diff --git a/sage/matrix/matrix_double_dense.pyx b/sage/matrix/matrix_double_dense.pyx
    a b  
    12231223            [ 7.6  2.3  1.0]
    12241224            [ 1.0  2.0 -1.0]
    12251225            sage: b = vector(RDF,[1,2,3])
    1226             sage: x = A.solve_left(b); x
     1226            sage: x = A.solve_left(b); x.zero_at(1e-18) # fix noisy zeroes
    12271227            (0.666666666..., 0.0, 0.333333333...)
    12281228            sage: x.parent()
    12291229            Vector space of dimension 3 over Real Double Field