Ticket #7852: trac_7852-adjust_noisy_zero_term_threshold_for_polys.reviewer.patch

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

Reviewer patch. Slightly adjust threshold for noisy zero terms in polynomials, needed on MacOS X 10.6 x86_64 with GCC 4.2.1. Apply on top of other patches (i.e., the other reviewer patch to polynomial_element.pyx).

  • sage/rings/polynomial/polynomial_element.pyx

    # HG changeset patch
    # User Leif Leonhardy <not.really@online.de>
    # Date 1317158881 -7200
    # Node ID 3edcf35ed80d616a4ebc5e4f865c194bda5a6564
    # Parent  211fd1e76e5a28003b9c28e620a1633b36fd1ac2
    #7852 Reviewer patch: Adjust threshold for noisy zero terms for MacOS X 10.6 x86_64 / GCC 4.2.1 in one case.
    
    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)<=1e-15 else c for c in poly.coeffs() ])
     1038            sage: parent(poly)([ 0.0 if abs(c)<=2.5e-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