# Ticket #9400: 9400_docfix.patch

File 9400_docfix.patch, 2.3 KB (added by jdemeyer, 12 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 - 1: assume that no square of a prime>primelimit divides the discriminant of ``x``. - 2: use round 2 algorithm instead of round 4. If present, ``fa`` provides the matrix of a partial factorization of the discriminant of ``x``, useful if one wants only an order maximal at certain primes only. sage: pari('x^3 - 17').nfbasis() [1, x, 1/3*x^2 - 1/3*x + 1/3] We test ``flag`` = 1, noting it gives it wrong result when the We test ``flag`` = 1, noting it gives a wrong result when the discriminant (-4 * `p`^2 * `q` in the example below) has a big square factor:: sage: pari(f).nfbasis(fa = "[2,2; %s,2]"%p)    # Correct result and faster [1, 1/10000000019*x] TESTS:: ``flag`` = 2 should give the same result: TESTS: ``flag`` = 2 should give the same result:: sage: pari('x^3 - 17').nfbasis(flag = 2) [1, x, 1/3*x^2 - 1/3*x + 1/3] """ sage: pari('x^3 - 17').nfinit() [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]] TESTS:: TESTS: This example only works after increasing precision::