Ticket #9400: 9400_docfix.patch

File 9400_docfix.patch, 2.3 KB (added by jdemeyer, 10 years ago)

Apply on top of previous 2 patches, small documentation fixes

  • sage/libs/pari/gen.pyx

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1283690371 -7200
    # Node ID c04582dbb6506b1d46afbcceb2fcb1a9976afaf9
    # Parent  7cb0debc09dc3b6090647061dd6be447d92b928a
    [mq]: 9400_docfix
    
    diff -r 7cb0debc09dc -r c04582dbb650 sage/libs/pari/gen.pyx
    a b  
    64476447         - 1: assume that no square of a prime>primelimit divides the
    64486448              discriminant of ``x``.
    64496449         - 2: use round 2 algorithm instead of round 4.
     6450       
    64506451        If present, ``fa`` provides the matrix of a partial factorization of
    64516452        the discriminant of ``x``, useful if one wants only an order maximal at
    64526453        certain primes only.
     
    64566457            sage: pari('x^3 - 17').nfbasis()
    64576458            [1, x, 1/3*x^2 - 1/3*x + 1/3]
    64586459       
    6459         We test ``flag`` = 1, noting it gives it wrong result when the
     6460        We test ``flag`` = 1, noting it gives a wrong result when the
    64606461        discriminant (-4 * `p`^2 * `q` in the example below) has a big square
    64616462        factor::
    64626463       
     
    64696470            sage: pari(f).nfbasis(fa = "[2,2; %s,2]"%p)    # Correct result and faster
    64706471            [1, 1/10000000019*x]
    64716472       
    6472         TESTS::
    6473        
    6474             ``flag`` = 2 should give the same result:
     6473        TESTS:
     6474       
     6475        ``flag`` = 2 should give the same result::
     6476           
    64756477            sage: pari('x^3 - 17').nfbasis(flag = 2)
    64766478            [1, x, 1/3*x^2 - 1/3*x + 1/3]
    64776479        """
     
    65976599            sage: pari('x^3 - 17').nfinit()
    65986600            [x^3 - 17, [1, 1], -867, 3, [[1, 1.68006..., 2.57128...; 1, -0.340034... + 2.65083...*I, -1.28564... - 2.22679...*I], [1, 1.68006..., 2.57128...; 1, 2.31080..., -3.51243...; 1, -2.99087..., 0.941154...], [1, 2, 3; 1, 2, -4; 1, -3, 1], [3, 1, 0; 1, -11, 17; 0, 17, 0], [51, 0, 16; 0, 17, 3; 0, 0, 1], [17, 0, -1; 0, 0, 3; -1, 3, 2], [51, [-17, 6, -1; 0, -18, 3; 1, 0, -16]]], [2.57128..., -1.28564... - 2.22679...*I], [1, 1/3*x^2 - 1/3*x + 1/3, x], [1, 0, -1; 0, 0, 3; 0, 1, 1], [1, 0, 0, 0, -4, 6, 0, 6, -1; 0, 1, 0, 1, 1, -1, 0, -1, 3; 0, 0, 1, 0, 2, 0, 1, 0, 1]]
    65996601           
    6600         TESTS::
     6602        TESTS:
    66016603       
    66026604        This example only works after increasing precision::
    66036605