Ticket #9400: 9400_docfix.patch
File 9400_docfix.patch, 2.3 KB (added by , 12 years ago) |
---|
-
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 6447 6447 - 1: assume that no square of a prime>primelimit divides the 6448 6448 discriminant of ``x``. 6449 6449 - 2: use round 2 algorithm instead of round 4. 6450 6450 6451 If present, ``fa`` provides the matrix of a partial factorization of 6451 6452 the discriminant of ``x``, useful if one wants only an order maximal at 6452 6453 certain primes only. … … 6456 6457 sage: pari('x^3 - 17').nfbasis() 6457 6458 [1, x, 1/3*x^2 - 1/3*x + 1/3] 6458 6459 6459 We test ``flag`` = 1, noting it gives itwrong result when the6460 We test ``flag`` = 1, noting it gives a wrong result when the 6460 6461 discriminant (-4 * `p`^2 * `q` in the example below) has a big square 6461 6462 factor:: 6462 6463 … … 6469 6470 sage: pari(f).nfbasis(fa = "[2,2; %s,2]"%p) # Correct result and faster 6470 6471 [1, 1/10000000019*x] 6471 6472 6472 TESTS:: 6473 6474 ``flag`` = 2 should give the same result: 6473 TESTS: 6474 6475 ``flag`` = 2 should give the same result:: 6476 6475 6477 sage: pari('x^3 - 17').nfbasis(flag = 2) 6476 6478 [1, x, 1/3*x^2 - 1/3*x + 1/3] 6477 6479 """ … … 6597 6599 sage: pari('x^3 - 17').nfinit() 6598 6600 [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]] 6599 6601 6600 TESTS: :6602 TESTS: 6601 6603 6602 6604 This example only works after increasing precision:: 6603 6605