Ticket #9958: trac_9958-matrix_mod2e_dense.patch

File trac_9958-matrix_mod2e_dense.patch, 1004 bytes (added by fbissey, 9 years ago)

fix numerical noise introduced by m4rie

  • sage/matrix/matrix_mod2e_dense.pyx

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1323134638 -46800
    # Node ID a6dff25c1409e926b6b2f1622c77987f08659203
    # Parent  41db85fa4b823a85e53c1cf9d54b7fe2e321c266
    trac 9958: fix numerical noise introduced with m4rie
    
    diff --git a/sage/matrix/matrix_mod2e_dense.pyx b/sage/matrix/matrix_mod2e_dense.pyx
    a b  
    788788            sage: K.<a> = GF(2^4)
    789789            sage: A = random_matrix(K,1000,1000,density=0.1)
    790790            sage: float(A.density())
    791             0.099738...
     791            0.099739...
    792792
    793793            sage: A = random_matrix(K,1000,1000,density=1.0)
    794794            sage: float(A.density())
     
    796796
    797797            sage: A = random_matrix(K,1000,1000,density=0.5)
    798798            sage: float(A.density())
    799             0.499759...
     799            0.49976...
    800800
    801801        Note, that the matrix is updated and not zero-ed out before
    802802        being randomized::