Ticket #11901: trac_11901-adjust_threshold_for_noisy_zero_terms_in_polynomial_element.patch

File trac_11901-adjust_threshold_for_noisy_zero_terms_in_polynomial_element.patch, 967 bytes (added by leif, 10 years ago)

Sage library patch. Based on Sage 4.7.2.alpha3 / #7852.

  • sage/rings/polynomial/polynomial_element.pyx

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1317928838 -7200
    # Node ID 5c5d5a15960231a473577757d5dae1e5d7fcc099
    # Parent  c2d634237f927447c7c7a57b32638805392d977f
    #11901: Adjust threshold for noisy zero terms in polynomials once again (for MacOS X 10.4 PPC).
    
    diff --git a/sage/rings/polynomial/polynomial_element.pyx b/sage/rings/polynomial/polynomial_element.pyx
    a b  
    10351035            -0.0319636125...*x^3 - 0.0383269759...*x^2 - 0.0463050900...*x + 0.346479687...
    10361036            sage: poly = f*g % m
    10371037            sage: # Remove noisy zero terms:
    1038             sage: parent(poly)([ 0.0 if abs(c)<=2.5e-15 else c for c in poly.coeffs() ])
     1038            sage: parent(poly)([ 0.0 if abs(c)<=2.7e-15 else c for c in poly.coeffs() ])
    10391039            1.0
    10401040
    10411041        ALGORITHM: Solve the system as + mt = 1, returning s as the inverse