-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNEW
More file actions
1171 lines (900 loc) · 50 KB
/
NEW
File metadata and controls
1171 lines (900 loc) · 50 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file highlights some of the novelties in PARI/GP 2.x compared to 1.39.15
(last release in the 1.x series). The detailed Changelog is in CHANGES.
Incompatible changes are described in COMPAT.
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[The GP language]
- new iterators: forperm (over permutations), forsubset (over subsets),
forfactored/fordivfactored (over integers/divisors in factored form),
forsquarefree (over squarefree integers), forprimestep (over primes in
arithmetic progressions). We also allow forstep(a,b, Mod(c,q), ...)
- new interface for handling files: fileclose, fileextern, fileflush,
fileopen fileread, filereadstr, filewrite, filewrite1. Orders of magnitude
faster than read / write for small incremental I/O operations
- allow \r "foo bar" to allow filenames containing spaces (quotes around
file names are optional; also for \l and \w).
- new function printp to print matrices in 2-D as output by gp
[ existed in 2.5 with a different meaning: "pretty" format ]
- default(echo, 2): print lines as is, including whitespace and comments
[Multiprecision Kernel]
- new function exponent()
- new function log1p(x) = log(1+x) accurate near 0
- improvements to sqrtn, log, lngamma, expm1
[Numerical summation and integration]
- derivnum: allow order k derivatives
? derivnum(x = 0, exp(sin(x)), 16) \\ 16-th derivative
%1 = -52635599.000000000000000000000000000000
- new numerical summation functions: sumnumap / sumnumapinit (Abel-Plana),
sumnumlagrange / sumnulagrangeinit (Lagrange)
- new functions prodeulerrat, sumeulerrat, sumnumrat, prodnumrat for
numerical summation/product of rational functions at integers or primes
- intnum: allow power series as limits for the integration interval
- new function laurentseries
[Combinatorics]
- new functions permorder (order of a permutation), permsign (signature)
- binomial(n): vector of all binomial(n, k) 0 <= k <= n
- new function vecprod = prod(i = 1, #v, v[i]) using product tree
- new function matpermanent
[Elementary Number Theory]
- ECPP primality proof: primecert, primecertexport, primecertisvalid; also
used by isprime()
- new function divisorslenstra (divisors in residue classes)
- new functions to manipulate Abelian characters
* general characters: chargalois (Galois orbits), charpow (chi^n),
* Dirichlet characters: znchar (convert datum to Dirichlet character)
znchargauss (complex Gauss sum), zncharconductor, znchartoprimitive,
znchardecompose (chi mod N = chi_Q chi_N/Q),
- issquarefree / isfundamental / quaddisc: allow integers in factored form
- fast chinese remainder, fast multimodular reduction (reduce integer N mod
p1, ..., pk)
- optional flag to 'divisors' (include factorization)
[Finite fields]
- new interface to handle maps between finite fields: ffmap (evaluate a map),
ffinvmap (invert a map), ffcompomap (compose maps), ffextend (create a map
from K to K[t]/(T)), ffembed(a,b) (create a map from k(a) to k(b)),
fffrobenius (create Frobenius as a map)
- parallel znlog/fflog over large prime fields and fields of
characteristic <= 5
[Polynomials, Rational functions & Power series]
- new interface to factorization and root finding over finite fields;
extend factormod(f, D) for general finite fields: D = p prime [over Fp],
D = [T,p] (over Fp[x]/(T)) D a t_FFELT (over attached Fq), or omited
[over field of definition of f]. Same for polrootsmod.
- new functions factormodSQF (squarefree factorization), factormodDDF
(distinct degree factorization)
- new function polrootsbound (sharp upper bound for complex roots)
- polcoeff is deprecated and renamed polcoef: it now only applies
to scalars, polynomials, series and rational functions; no longer to
vector/matrices or quadratic forms (use [], or "component", or
[a,b,c] = q for a binary quadratic form q).
- new function serchop(s,n): cut off all terms of degree < n in series 's'
- a new optional argument to denominator/content/numerator to allow better
control over semantic, e.g.,
No arg: denominator([1/2, 1/x, 1/y]) -> 2*y*x
denominator([1/2, 1/x, x/y]) -> 2*x
denominator([x/2, 1/x, 1/y]) -> y*x
With arg: denominator(..., 1) is 2 in all 3 cases
denominator(..., x) is x in all 3 cases
denominator(..., y) is y in all 3 cases
[Linear Algebra]
- Linear algebra over Z/NZ: matdetmod, matimagemod, matinvmod, matkermod,
matsolvemod (also makes matrixqz(,-1 or- 2) an order of magnitude faster)
- new modular implementation of linear algebra over Z and cyclotomic rings
- asymptotically fast linear algebra over finite fields, using CUP
decomposition
- allow matsolve(M,b) when M is only left-invertible
[Elliptic curves]
- E/Qp now allowed in ellap, ellcard, ellgroup, ellissupersingular
[these four now also allow models which are not p-integral],
ellintegralmodel, ellpadicfrobenius, ellpadics2 (now allows curve with
multiplicative reduction), elllocalred
- extend support for curves over number fields: ellheight, ellrootno,
ellpointtoz, E.omega, E.eta, E.area, ellgroup(E, P) (P maximal ideal),
ellisomat [E without CM].
- new functions elltamagawa, ellbsd, ellpadicbsd, ellpadicregulator,
ellweilcurve, ellminimaldisc, ellisotree
- new functions ellratpoints and hyperellratpoints based on
Michael Stoll 'ratpoints'.
[Spaces of Modular Forms] New package; see ??14 and ??tutorial-mf
getcache lfunmf mfDelta mfEH
mfEk mfTheta mfatkin mfatkineigenvalues
mfatkininit mfbasis mfbd mfbracket
mfcoef mfcoefs mfconductor mfcosets
mfcuspisregular mfcusps mfcuspval mfcuspwidth
mfderiv mfderivE2 mfdescribe mfdim
mfdiv mfeigenbasis mfeigensearch mfeisenstein
mfembed mfeval mffields mffromell
mffrometaquo mffromlfun mffromqf mfgaloistype
mfhecke mfheckemat mfinit mfisCM
mfisequal mfkohnenbasis mfkohnenbijection mfkohneneigenbasis
mflinear mfmanin mfmul mfnumcusps
mfparams mfperiodpol mfperiodpolbasis mfpetersson
mfpow mfsearch mfshift mfshimura
mfslashexpansion mfspace mfsplit mfsturm
mfsymbol mfsymboleval mftaylor mftobasis
mftocoset mftonew mftraceform mftwist
[Modular symbols & p-adic L functions]
- the package now supports level N = 1
- new functions msdim (dimension), mslattice (canonical integral structure),
mspetersson (intersection product), mspolygon (hyperbolic polygon / Farey
symbol attached to Gamma_0(N))
- msfromell: use a much faster modular algorithm, allow a vector
of isogenous curves
- allow mssplit(M) by itself, splits msnew(M) by default
[Complex L-functions]
- lfuncreate: allow specifying an arbitrary growth rate a(n) << n^(c + eps)
[by default, assume Ramanujan-Petersson]
- new functions lfuntwist (twist by Dirichlet character), lfunsympow
(symmetric power)
- allow zeta(power series)
- new function zetahurwitz (complex or p-adic inputs)
- new function zetamultall (all MZV of bounded weight), zetamultinit,
zetamultconvert
[Number Fields]
- new functions nfeltembed (complex embeddings), nfeltsign (signs of real
embeddings), nfpolsturm (number of real roots of s(T) for T in K[X] and
s a real embedding of K), bestapprnf (algdep for a known number field),
idealispower (I = J^n ?), idealredmodpower (reduce mod n-th powers)
poldiscfactors (fast partial factorisation of poldisc(T)),
- new functions to handle representations of galoisinit G:
galoisconjclasses (conjugacy classes of G), galoischartable (character
table), galoischarpoly (characteristic polynomial of representation),
galoischardet (determinant).
- new functions to query the GALPOL database: galoisgetgroup, galoisgetname
- bnrinit(,,1) [include generators] is no longer necessary for bnrL1,
bnrconductor, bnrrootnumber, bnrstark, rnfkummer, galoissubcyclo
- faster nfgaloismatrix / nfgaloisapply(nf,s, ideal)
- change rnfpolredabs so that it outputs a canonical polynomial.
As a result, the function is no longer Obsolete.
- optional argument to idealfactor [limit factorization]
[Associative and central simple algebras]
- new functions alggroupcenter (Z(K[G])), algmakeintegral (integral
multiplication table), algsplit (isomorphism between A/F_p and a matrix
algebra M_d(F_p^n), where dim A = n*d^2)
- new functions to handle full lattices: alglatadd, alglatcontains,
alglatelement, alglathnf, alglatindex, alglatinter,
alglatlefttransporter, alglatmul, alglatrighttransporter, alglatsubset
[Graphics]
- new functions plotexport / plothexport (support PostScript and SVG formats)
The functions psdraw, psploth and psplothraw and the default 'psfile'
are obsolete: use one of plotexport, plothexport or plothrawexport
with format "ps" and write the result to file.
- graph/plotport.c is now part of libpari
- plotcolor(w, col) now allows color names (t_STR), [R,G,B] values
or "#RRGGBB" hex triplet; returns the [R,G,B] value attached to c
- allow plotdraw(w) for plotdraw([w,0,0])
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A new set of reference cards was prepared for an overview of 2.9.* GP
functions, see doc/refcard*.dvi or http://pari.math.u-bordeaux.fr/doc#refcard
[Systems]
- Mingw64 support (Windows 64 bit)
- Unify 32/64 bit random generators. Probabilistic algorithms should now
behave identically on all architecture, provided they do not involve
the floating point kernel
[The GP language]
- Support for variadic GP functions (having any number of arguments), e.g.
? f(v[..]) = sum(i = 1, #v, v[i])
? f(1, 2, 3, 4, 5)
%2 = 15
- New constant "oo" (for +/- infinity)
- Simpler handling of polynomial variables: polynomial variables no longer
spring into existence whenever a new identifier occurs in the parser,
only if a polynomial is explicitly created; e.g. t = 0 no longer creates
the "polynomial variable" t thereby messing up variable ordering.
Functions varhigher() and varlower() allow to define
variables of arbitrary priority independently of the session history;
variables() returns the list of variables occuring in an object:
? variable(x + y*z / t)
%1 = x
? variables(x + y*z / t)
%2 = [x, y, z, t]
- Hashtables/dictionaries in GP via functions Map, mapget, mapput,
mapisdefined, mapdelete
? M = Map(); \\ empty dictionary
? mapput(M, "a", 23); \\ insert key/value: "a" maps to 23
? mapput(M, "b", 43); \\ "b" maps to 43
? mapget(M, "a") \\ retrieve value attached to key "a"
%3 = 23
? M = Map(["a", 23; "b", 43]); \\ fast initialization
- New functions allow setting precision at the bit-level (instead of the
word-level = 64 bits); new default 'realbitprecision' and \pb shortcut,
and a function bitprecision()
- Warn when coercing quotient rings when 'debug' is non-zero
? \g1
? Mod(1,2)+Mod(1,3)
*** _+_: Warning: coercing quotient rings; moduli 2 and 3 -> 1.
- More versatile closures: function self() for recursive anonymous
functions, call() to apply a function of unspecified arity to arbitrary
arguments), fold() such that fold(f,v) = f(...(f(v[1], v[2]), ...,) v[#v])
- Miscellaneous new GP functions: serprec, powers, parforvec
[Multiprecision Kernel]
- incgam, incgamc, eint1 more reliable
- new functions sinc(x) = sin(x) / x and cotanh = 1/tanh
- improved p-adic log at high accuracy
- improved gamma, lngamma and psi at power series arguments
[Numerical sumation and integration]
- rewrote numerical integration routines, which can of course
directly use the new oo symbol:
? intnum(t = -oo, oo, 1/(1+t^2)) - Pi
%1 = 0.E-37
- Gauss-Legendre quadrature: intnumgauss()
- Rewrote numerical sumation (replace Abel-Plana by Euler-Mac Laurin).
This changed the sumnum() interface !
- Monien summation: sumnummonien()
- Numerical extrapolation: limitnum(), asympnum()
? limitnum(n -> (1+1/n)^n) - exp(1)
%1 = 0.E-37
? asympnum(n -> n! / (sqrt(2*Pi) * n^(n+1/2) * exp(-n)))
%2 = [1, 1/12, 1/288, -139/51840, -571/2488320, 163879/209018880,
5246819/75246796800, -534703531/902961561600]
- Continued fractions for numerical approximation via Pade approximants:
contfracinit() and contfraceval()
- Inverse Mellin transforms of Gamma products: gammamellininv()
- Multiple Zeta Values: zetamult()
? zetamult([2,1]) - zeta(3) \\ Euler's identity
%1 = 0.E-38
- zeta(odd integer): use Borwein's "sumalt" algorithm (10 times faster
than previous at \p1000)
[Elementary Number Theory]
- Bounded factorization factor(n,lim) now always respects the 'lim'
argument (was ignored when n fit into a long integer)
- sumdigits() now allows to specify the base; new function fromdigits()
- Allow ffgen([p,f]) in addition to ffgen(p^f) and ffgen(T*Mod(1,p))
- New functions for generic characters: charker, charorder, charconj,
charmul, chardiv, chareval
- New functions for Dirichlet characters: znconreychar, znconreyexp,
znconreylog, znconreyconductor, zncharinduce, zncharisodd,
znchartokronecker. See ??Dirichlet
The functions idealstar / ideallog now allow omitting 'nf' argument for
nf = Q allowing to handle efficiently Dirichlet characters as Hecke
characters.
- Miscellaneous new functions: qfbredsl2(), ispseudoprimepower(),
ramanujantau()
[Polynomials]
- Real root finder: new function polrootsreal(T, [a,b])
- factorcantor now uses Shoup-Kaltofen algorithm (much faster)
- padicfields(p, d) much faster for huge prime p
[Linear Algebra]
- faster matrix multiplication over Z (Strassen) and finite fields (better
handling of modular kernel)
- matsolve(a,b) and a^(-1) could give wrong results [or SEGV] when t_MAT
'a' was non-square
- faster implementation of matfrobenius/minpoly
- matkerint: replace underlying LLL algorithm by mathnf
Simple bench: M=matrix(50,55,i,j,random(10^5)); \\ 200 times faster
[Elliptic curves]
- Twists and Isogenies: elltwist, ellisogeny, ellisogenyapply, ellxn.
- Modular polynomial attached to various class invariants: polmodular();
attached class polynomials defining Hilbert class fields: polclass().
- Formal groups: ellformalw, ellformalpoint, ellformaldifferential,
ellformallog, ellformalexp
- Elliptic curves over finite fields: ellissupersingular(), fast ellcard()
over fields of small, medium or large characteristic (SEA, Kedlaya, Satoh),
ellsea() for ellcard with early abort (almost prime cardinality);
elltatepairing() now reliable for self-pairings
- Elliptic curves over Q: ellrootno(e, 2 or 3) for non-minimal e is now
properly supported; more robust and much faster ellL1() and
ellanalyticrank() (the condition ord(L_E,s=1) <= r in ellL1(E,r) is no
longer necessary; r is now optional, 0 by default); p-adic heights:
ellpadics2, ellpadicheight, ellpadicheightmatrix; p-adic L function:
ellpadicL (see also mspadicL);
Q-isogenous curves and matrix of isogeny degrees: ellisomat; minimal
quadratic twist: ellminimaltwist; smallest multiple having good reduction
everywhere: ellnonsingularmultiple; new optional flag to forell to loop
over isogeny classes.
- Elliptic curves over number fields: ellinit([a1,...,a5], nf);
support elltors, ellorder, elisdivisible, elllocalred, ellminimalmodel,
ellan, ellap(E,P), ellcard(E,P) for P a maximal ideal
- Elliptic curves over p-adic fields: Q_2 is now properly supported,
ellpointtoz(E / Qp) has been fixed and the converse ellztopoint
implemented, added Mazur-Tate-Teitelbaum's L invariant to E.tate;
new function ellpadiclog.
[Other Curves of small genus]
- Rational points on conics/Q : qfsolve, qfparam [ adapted from Denis Simon's
qfsolve.gp ]
- General cubic/binary quartic to Weierstrass model: ellfromeqn()
- genus2red: allow rational non integral models + change input so that either
genus2red(P) for y^2 = P and genus2red([P,Q]) for y^2 + x*Q = P are
recognized; the output is now normalized + many bug fixes.
- new functions ellpadicfrobenius, hyperellpadicfrobenius, hyperellcharpoly
[Modular symbols & p-adic L functions] New package; see ??8
- Modular symbols for Gamma_0(N):
msatkinlehner msfromell mshecke mspathlog
mscuspidal msfromhecke msinit msqexpansion
mseisenstein msgetlevel msissymbol mssplit
mseval msgetsign msnew msstar
msfromcusp msgetweight mspathgens
- Attached overconvergent symbols, p-adic distributions and L-functions:
mstooms, msomseval, mspadicL, mspadicinit, mspadicmoments, mspadicseries
[Complex L-functions] New package; see ??6 and ??Ldata
lfun lfundiv lfunmfspec
lfunabelianrelinit lfunetaquo lfunmul lfuntheta
lfunan lfunhardy lfunorderzero lfunthetainit
lfuncheckfeq lfuninit lfunqf lfunzeros
lfunconductor lfunlambda lfunrootres lfunartin
lfuncreate
[Associative and central simple algebras] New package, see the tutorial !
algabsdim algdisc algisramified algrandom
algadd algdivl algissemisimple algrelmultable
algalgtobasis algdivr algissimple algsimpledec
algaut alghasse algissplit algsplittingdata
algb alghassef algleftmultable algsplittingfield
algbasis alghassei algmul algsplittingmatrix
algbasistoalg algindex algmultable algsqr
algcenter alginit algneg algsub
algcentralproj alginv algnorm algsubalg
algchar alginvbasis algpoleval algtableinit
algcharpoly algisassociative algpow algtensor
algdecomposition algiscommutative algprimesubalg algtrace
algdegree algisdivision algquotient algtype
algdim algisdivl algradical
algisinv algramifiedplaces
[Number Fields]
- New "compositum" functions. nfcompositum(): over number fields;
new binary flag to polcompositum() to assume fields are linearly disjoint;
nfsplitting: equation for splitting field / Q
- Class groups and units: use GRH-guaranteed bounds in bnfinit for residue
estimate; made qfbclassno more reliable: correct for |D| < 2.10^10 and no
known counter example; of course you can double check with quadclassunit()
(rigorous under GRH but much slower up to |D| ~ 10^18 or so).
- Class field theory: bnrisgalois, bnrgaloismatrix, bnrgaloisapply;
faster and more reliable rnfkummer; bnrconductor(bnr, chi) as a shortcut
for bnrconductor(bnr, Ker chi), same for bnrisconductor, bnrdisc and
bnrclassno; bnrchar to define classes of Hecke characters, e.g. trivial on
some congruence subgroup. Faster bnfcertify when the field has
Q-automorphisms. New function nfislocalpower.
Logarithmic class groups: new functions bnflog, bnflogdegree, bnflogef,
rnfislocalcyclo.
- Relative number fields: rnf structures may now contain a full absolute nf
struct, attached to rnf.polabs; nfinit(rnf) returns it. This allows rnf
functions to return objects in standard notation (e.g. ideals in HNF
instead of as a vector of t_POLMOD generators); add optional flag to
that effect in rnfeltabstorel, rnfeltdown, rnfeltup, rnfidealreltoabs,
rnfinit. New functions rnfidealprimedec, rnfidealfactor. Add optional
flag to nfhnf and nfsnf to return transformation matrices.
- Projection to / lift from residue field: nfmodpr, nfmodprlift. (Functions
nfeltdivmodpr, nfeltmulmodpr, nfeltpowmodpr, nfeltreducemodpr, nfkermodpr,
nfsolvemodpr are now obsolete: use nfmodpr, work in the finite field,
then lift back using nfmodprlift.)
Faster idealchinese and allow sign conditions at specified real places
- idealprimedec now allows an optional 3rd argument, to limit f(P/p)
- Improvements in thue(), whose solutions are now canonically ordered
(lexsort); support (powers of) imaginary quadratic equations.
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[Configure]
- Configure --mt=pthread or --mt=mpi: GP now supports POSIX threads and MPI.
See doc/parallel.dvi for an introduction, and have a look at the new
parxxx GP functions.
- Configure -gcov: support for gcov/lcov. As a result, the regression suite
(make test-all) has been much expanded and lots of obscure bugs fixed. See
http://pari.math.u-bordeaux.fr/lcov-report/
for current coverage test reports.
- Configure now generates a file 'config.log' to help diagnose problems
(contains all messages from compilers)
[The GP language]
- Ranges and slices: [a..b], x[a..b], x[^a]
? v = [2..8]
%1 = [2, 3, 4, 5, 6, 7, 8]
? v[2..4]
%2 = [3, 4, 5]
? v[^2] \\ remove 2nd element
%3 = [2, 4, 5, 6, 7, 8]
? M = matid(3); M[1..2, ^2] \\ first two rows, remove 2nd col
%4 =
[1 0]
[0 0]
- Set notations:
? [ p | p <- primes(10), isprime(p+2) ]
%1 = [3, 5, 11, 17, 29]
- Multiple assignments: [a,b,c] = V, for a = V[1], b = V[2], c = V[3]
? [D,U,V] = matsnf(A, 1) \\ returns SNF and transformation matrices
- Error trapping: iferr() + a new data type 't_ERROR' to represent error
contexts. See ??iferr
\\ Compute [B]P on a "curve over Z/NZ". If an exception occurs,
\\ we found a zero divisor in Z/NZ, thereby factoring N.
ECM(N, B = 1000!, nb = 100)=
{
for(a = 1, nb,
iferr(ellmul(ellinit([a,1], N), [0,1], B),
E, return(gcd(lift(component(E,2)),N)),
errname(E) == "e_INV"));
}
? ECM(2^101-1)
%1 = 7432339208719
- Timeouts: alarm(delay, expr) spends 'delay' seconds trying to evaluate
'expr', then aborts returning a t_ERROR object.
- Multi-if: to simplify successive 'else' clauses
? if (a == 1, print("1"), \
a < 0, print("negative"), \
isprime(a), print("prime"), \
print("generic"))
- new function cmp() to "compare" arbitrary objects (transitive order
relation, returns 0 iff x === y). Useful for sets.
- new function getenv()
[The GP calculator]
- parallel GP support: parapply, pareval, parfor, parforprime, parselect,
parsum, parvector. E.g.
? parapply(factor, [2^256 + 1, 2^193 - 1])
will factor these two integers in parallel.
- forprime(p = a, b, ...) now iterates over arbitrary ranges of primes,
independently of 'primelimit'. Parameter 'b' can be omitted (no upper
limit). More generally, primelimit is now deprecated: libpari functions
can quickly produce their own primes without relying on (enough)
precomputed primes.
- new iterators: forcomposite(), forpart() forqfvec(), to loop
over composite integers, (possibly restricted) partitions and integer
points in ellipsoids.
- GP debugger, new functions expanding the 'break loop' mechanism: dbg_up(),
dbg_down(), dbg_x(), breakpoint()
- liftall(), liftint(), liftpol() give more flexibility than lift() in
complicated situations
- characteristic(x) returns the "characteristic" of the base ring over which
x is defined.
- ffgen(p^f), as an alias for ffgen(ffinit(p,f))
- vecsum(v), as an alias for sum(i=1,#v,v[i])
- variable() no longer raise exceptions, but returns 0 if the object
has no main variable.
- getabstime() returns the CPU time elapsed since gp startup, providing a
reentrant version of gettime()
- %#n returns the time it took to compute history result %n
- new default 'linewrap'
- arbitrary GP 'defaults' can now be set via the command-line:
gp -D default=value
gp --primelimit lim (gp -p lim) and gp --stacksize=lim are deprecated.
Use the generic form (-D parisize=lim or -D primelimit=lim)
[Multiprecision Kernel & Transcendental functions]
- binary splitting: Catalan's constant, Pi, log(2) (to be expanded)
- logint(x,b) for floor(log(x) / log(b)), avoiding rounding problems
- sqrtnint(x,b) for floor(x^(1/b))
- expm1(x) for exp(x) - 1, but also accurate for x ~ 0
[Polynomial Arithmetic & Power series]
- Mulders/Hanrot-Zimmerman short products for power series
- Allow t_SER arguments for gamma, lngamma, and psi around arbitrary
complex numbers (was either forbidden or limited to z = 0 or 1)
- seralgdep: to find linear relations with polynomial coefficients
? s = 1+1/2*y+3/8*y^2-3/16*y^3+3/128*y^4+15/256*y^5-57/1024*y^6 + O(y^7);
? seralgdep(s,2,2) \\ relation of degree <= 2, degree(coeffs) <= 2
%2 = -x^2 + (y^2 + y + 1)
- polgraeffe(f): returns g such that g(x^2) = f(x)f(-x)
- poliscyclo(), poliscycloprod(), polcyclofactors(): cyclotomic factors
of rational polynomials
[Linear Algebra]
- port of the program ISOM by Bernd Souvignier for computation of
automorphisms and isomorphisms of lattices.
New GP functions: qfauto, qfisom, qfisominit, qfautoexport
- linear algebra routines now try to convert generic GP constructions
involving t_INTMODs or t_FFELTs to appropriate (faster, more memory
efficient) representations, then call routines in the libpari modular
kernel (FpM, Flm, F2m, FqM, FlxqM, F2xqM).
- add optional flag to mateigen to also return the eigenvalues
- charpoly() now selects an appropriate algorithm by itself, depending
on the input. Using a flag should no longer be necessary and is
deprecated.
- mathnf for matrices over K[X]
- mathnfmodid(x,D), where D = [d1,...,dn] compute the HNF of
concat(x,matdiagonal(D)); in a more efficient way
- matqr() to compute the QR-decomposition of a real square matrix;
mathouseholder() to apply a sequence of Householder transforms
- internal support for sparse matrices and Wiedemann algorithm; currently
only used by the discrete log algorithms.
- matinverseimage(A, t_MAT B) would treat individual columns B[,i]
independently and successively. Now use a single Gauss reduction.
- normlp(): true L^p norm [ N.B. the old norml2() is still available,
and returns the *square* of the L^2 norm ].
- clean generalizations of current norml2: qfnorm(), qfbil()
[Elementary Number Theory]
- arithmetic functions now accept factorization matrices as input, you can
use any of f(N), f(factor(N)) or f([N, factor(N)]).
- arithmetic functions no longer apply componentwise to vector / matrix
arguments [ to allow passing factorization matrices ]: use apply()
- new convenience functions: hamming(), ispowerful(), digits() /
sumdigits(), ispolygonal(), istotient(), isprimepower()
- randomprime(), random([a,b])
- Bernoulli polynomials: bernpol() and sumformal()
? sumformal(n^2) \\ F such that F(b) = \sum_{n <= b} n^2
%1 = 1/3*n^3 + 1/2*n^2 + 1/6*n
- sumdivmult: to sum multiplicative expressions
- sieve algorithms for znlog() and fflog(), computing discrete logs in F_q^*
[Elliptic curves & Arithmetic geometry]
- new dynamic implementation of the 'ell' data structure: ellinit is now
used to record the coefficients of the curve and the domain over which it
is defined. Further data is added to the structure on demand, if and when
it is needed, e.g. cardinality and group structure. See ??ellinit.
- elliptic curves functions no longer assume that a curve over Q is given by
a minimal model. A non-miminal model used to silently produce wrong
answers; no longer!
- allow ellinit(E / Qp) for arbitrary p (also p = 2) and reduction type
(no longer restricted to Tate curves)
- allow ellinit(E / Fq) for non-prime finite fields, incl. point counting
(SEA, Harley)
- allow ellinit(E / C)
- new function ellheegner() to find a non-torsion rational point on
E / Q of rank 1.
- new implementation of ellweilpairing / elltatepairing
- ellsearch now accepts both syntaxes allowed by ellconvertname(),
e.g. "11a3" / "11a" and [11,0,3] / [11,0]
- extend ellinit inputs: ellinit([a4, a6]). On singular curve, return []
instead of raising an error. New function ellfromj().
- genus2red: an implementation of Liu's algorithm to determine the
reduction of a genus 2 curve (at p > 2). Based on genus2reduction-0.3,
http://www.math.u-bordeaux.fr/~liu/G2R/ (Cohen & Liu, 1994)
mostly rewritten from scratch, and fixing known problems in the original
implementation (so-called bug27, bug28). The regression bench contains a
check of at least one instance of each of Namikawa-Ueno's types + all
cases on which the original genus2reduction was known to fail.
CAVEAT: the interface will probably change & reduction at p = 2 not handled
[Number Fields]
- maximal orders (when the discriminant is hard to factor): allow to specify
a list of primes at which the order nf.zk must be maximal. This [T, listP]
format supersedes the old addprimes() hack as well as rigid optional
flags for nfbasis, nfdisc, polredabs. (And no longer depends on the
global 'primelimit'...) See ??nfinit
? T = polcompositum(x^5 - 101, polcyclo(7))[1];
? nf = nfinit( [T, 10^3] );
? nfcertify(nf)
%3 = []
A priori, nf.zk defines an order which is known to be maximal at all
p <= 10^3. The final certification step proves it is in fact
globally maximal.
- polredbest / rnfpolredbest: "best-effort" variants of polredabs /
rnfpolredabs. Not canonical but often smaller, and run in poly-time !
- idealprincipalunits: structure of the multiplicative group
(1 + pr) / (1 + pr^k), for a prime ideal pr
[ special case of idealstar, faster ]
[COMPATIBILITY WARNING]
- lift(x,'v) / centerlift(x,'v) now only lift t_POLMODs in variable v,
no longer (most) t_INTMOD / t_PADICs met along the way
- rnf.pol (absolute defining polynomial / Q) has been renamed rnf.polabs.
rnf.pol is now the relative polynomial, defining the relative extension
over the base.
- as a side effect of the new %#n construction, all GP results are now stored
as history entries, including the "void" object returned by functions
such as print() or for().
- renamed bezout() -> gcdext()
- renamed ellpow() -> ellmul()
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[Libpari Build & Configuration]
- 'Configure --tune' fine-tunes gp and the PARI library for a given host.
On some machines this leads to noticeable performance improvements,
esp. when using the GMP multiprecision kernel.
- 'Configure --enable-tls' makes libpari thread-safe, for multi-threaded
applications. See Appendix B in the "User's Guide to the PARI Library"
[Multiprecision Kernel]
- The GMP library is now used by default if Configure can find it.
- Schoenhage-Strassen big integers multiplication to native kernel
(very useful if GMP not available)
[Polynomial Arithmetic]
- faster multiplication of integer polynomials (Kronecker's trick)
- subquadratic gcd over prime finite fields
- special polynomials (polcyclo, polchebyshev, pollegendre...) are orders
of magnitude faster ( polcyclo(10^6): 1min 30s (2.3) -> 4ms (2.5) ) and
directly allow evaluation at a given point, e.g. polcyclo(n, 2) for Phi_n(2).
- issquare(t_POL) now works reliably over prime finite fields ( we used
to have issquare(Mod(1,2)*(x^2+1)) -> 0, or error messages in more
complicated cases ).
- charpoly no longer assumes that the characteristic is 0 or large enough
(Berkowitz division-free algorithm).
[Linear Algebra]
- all LLL variants use an implementation of NGuyen & Stehle's L^2
algorithm : stabler, much faster
- better resultants
[Elliptic curves]
- ellap() now uses the SEA algorithm (port of GP's ellsea package).
- discrete logarithm [ elllog() ], group structure of E(Fp) [ ellgroup() ],
- division polynomials [ elldivpol() ]
- Tate and Weil pairings [ elltatepairing() / ellweilpairing() ]
[Number Fields]
- Class-field theoretic functions (e.g. bnfinit) no longer cheat on Bach's
constant. They now use safe bounds by default, correct under GRH, and no
slowdown has been observed.
- bnfinit: huge improvements for fields of large degree or admitting
non-trivial automorphisms (series of patches by Loic Grenie).
- faster quadhilbert(D < 0) [ Hilbert class field via CM ]
- Frobenius elements [ idealfrobenius() ]
- ramification groups [ idealramgroups() ]
[GP defaults]
- new default "factor_proven" to guarantee that all integer factorizations
outputs proven primes (the default is to be happy with strong pseudoprimes).
- new defaults "graphcolormap" and "graphcolors" to allow arbitrary
colormaps in hi-res plots.
- new default 'histfile', to save your typing history in between sessions !
[GP data structures]
- Lists now grow as needed, without imposing an awkward maximal length.
v = List() is now sufficient to initialize an empty list, instead of
v = listcreate(100) to initialize a list which wouldn't grow past 100
elements.
- New GP type to handle non-prime finite fields in a reasonably efficient
way. E.g:
? T = ffinit(7,5); \\ irreducible of degree 5 in F_7[x]
? t = ffgen(T); \\ The element x mod (T,p) in Fp[x] / (T) ~ F_{7^5}
%2 = x \\ this has type t_FFELT
? t^10 \\ handled like Mod(x, T) but faster, and less cumbersome
%3 = 5*x^4 + 5*x^2 + 5*x + 6
? fforder(t)
%4 = 5602 \\ multiplicative order
? g = ffprimroot(t); \\ primitive element
? fflog(g^1000,g)
%6 = 1000
- In GP-2.3, it was not possible to use the same identifier for
variables and functions; in GP-2.5 there is nothing wrong with defining
f(x,y)=x^2+y^2
then setting f = 1 (thereby deleting the user function). In fact, the
distinction between variables and functions has been abolished: anonymous
functions (closures) may be defined and assigned to variables, e.g.
the old f(x,y) = x^2+y^2 is now an alias for f = (x,y) -> x^2+y^2
[GP]
- the debugger, or "break loop", is now enabled by default
[ set breakloop = 0 in your gprc to disable it ], and no longer
controlled by trap(). The debugger is more verbose:
? f(x) = g(x);
? g(y) = 1/y;
? f(0)
*** at top-level: f(0)
*** ^----
*** in function f: g(x)
*** ^----
*** in function g: 1/y
*** ^--
*** _/_: division by zero
*** Break loop: type 'break' to go back to GP
break> y
0
- all GP functions are now understood by GP2C
- formatted printing : printf(), Strprintf()
- alarm(n) to abort a lengthy computation after n seconds.
- === "isidentical" operator, much stricter than ==
- The introducion of anonymous functions had a number of useful side effects;
for instance, it made possible two new functions select() and apply(), as
well as arbitrary comparisons in vecsort():
\\ primes in { i^2+1 : i <= 50 }
? select(x->isprime(x), vector(50,i,i^2+1))
%1 = [2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601]
? apply(x->x^2, [1,2,3,4])
%2 = [1, 4, 9, 16]
\\ sorts a vector of polynomials by increasing discriminant
? vecsort( v, (x,y) -> sign(poldisc(x) - poldisc(y)) )
[Main Backward Compatibility issues] see the 'COMPAT' file in the distribution
for the full list.
- The main issue with existing GP scripts has to do with the scope of
private variables (my vs. local), see section 2.6 in User's Manual.
Indeed, variables implicitly scoped to loop or function bodies are now
lexically scoped. From GP-2.5 on, in constructs like
for(i = 1, 10, g())
f(i) = g()
the index i is truly local to the loop/function body. It is no longer seen
by the function g(), as used to be the case in GP-2.3.
One can declare lexicaly-scoped variable anywhere using the construct
my(x, y, z, t), possibly with initializations: my(x = 1, y = x).
The old "local" keyword keeps the same semantic (dynamic scoping) and is
mostly obsolete, outside of very specific situations beyond the scope of
these release notes.
- function calls *must* include parentheses. I.e. typing 'f()' calls the
function f without arguments as expected, typing 'f' returns an anonymous
function with the same definition as f; for instance, v[1] = f is valid,
assigning the closure f to the first entry of vector v.
- private "prime table" (addprimes) must now contain primes only: its
entries are now used in all arithmetic functions
- The pseudo-random number generator has been changed. The old linear
congruential generator has been replaced by Brent's XORGEN, which uses
a Linear Feedback Shift Register: pseudo-random sequences are much
better behaved, e.g. matdet(matrix(5,5,i,j, random())) is no longer
guaranteed to be divisible by 2^90 or so. There is no simple way to
emulate GP-2.3 pseudo-random sequences in GP-2.5.
- PariEmacs is no longer distributed with PARI/GP. The "PARI Emacs shell"
is available as a separate package, to be downloaded once if at all.
- | and & were accepted as aliases for || and && respectively. This
construction still works in GP-2.5, but is scheduled to disappear. We
strongly advise to update scripts to use the proper '||' and '&&'
constructions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* The GP2C compiler is available at
http://pari.math.u-bordeaux.fr/download.html#gp2c
GP2C compiles GP scripts to the C language, easing the task of writing
PARI programs. It can transparently compile them to object code and
load the resulting functions in gp. Low-level gp2c-compiled scripts
typically run 3 or 4 times faster. Minor hand editing (specifying types)
typically gains a further factor 2.
* Cremona's database of elliptic curves is available through the 'elldata'
package [ to be downloaded separately ]
? E = ellinit([1,1,0,10,10]);
? id = ellidentify(E)[1] \\ [1] = discard change of variables
%2 = ["69950b1", [1, 1, 0, 10, 10], [[-1, 1], [-1/4, 23/8]]]
\\ gives name and generators
? E = ellinit("11a1"); E.disc
%3 = -161051
? ellsearch(11); \\ all curves of conductor 11
? forell(E, 10,20, print(E)) \\ iterate over curves of conductor 10-20
["11a1", [0, -1, 1, -10, -20], []]
...
Kernel:
* Use 'Configure --with-gmp' to replace the native multiprecision kernel by
the GNU MP library (featuring asymptotically fast arithmetic).
* Cleanup of all architecture specific kernels (all macroized); added
support for x86_64, ppc64, hppa and hppa64, ia64, sparc64, m68k.
* Faster algorithms for "transcendental" functions (divide/conquer square
root, AGM for log and Pi, Newton for exp and most trigonometric functions,
AGM for inverse trigonometric functions, rewrite for gamma and zeta =>
faster Bernoulli, Mestre's AGM for ellheight)
* Faster and cleaner kernel for modular arithmetic. Try e.g.
factormod/factorff or polcompositum.
* Major internal cleanups: separate lgef for t_POLs is gone, zero t_SER
and t_POL now handled in a uniform way, heuristic soft copies in
t_INTMOD, t_POLMOD, t_PADIC are gone [ led to fatal errors in complex
scripts, no performance penalty ]
* The "syntax" of GP routines and operators are no longer hard-coded in
the sources, but maintained in a separate database (pari.desc). This
way, external tools like GP2C need not be modified when the GP language
is changed.
Algebraic number Theory:
* Faster integral LLL (still not super fast, but getting better), and
polynomial factorization routines (over finite fields [ new modular
kernel ], Q or general number fields [ van Hoeij's algorithm ])
* Faster maximal order (round4 rewrite) and polredabs (esp. with flag
16: don't factor the discriminant; yields a canonical equation for a
field), faster ideal arithmetic (prime decomposition, approximation,
multiplication).
* Faster and more reliable class-field theoretic functions quadclassunit,
bnfinit, bnfisprincipal, bnrinit (and related functions, e.g. bnrconductor
or bnrdisc), rnfkummer, thue (fast enumeration of small solutions, don't
assume the full unit group is known).
* A set of fast routines for Galois theory (galoisininit, nfgaloisconj,
galoisisabelian, galoisfixedfield, galoissubfields, galoissubcyclo for
abelian fields, galoisidentify to identify large Galois fields up to
degree 127).
'galdata' package [ to be downloaded separately ]: polgalois is safer
and orders of magnitudes faster in tough cases, output is now
human readable
? polgalois(x^11-2)
time = 1,759 ms. \\ used to be ~ 1 hour
%1 = [110, -1, 4, "F_110(11)=11:10"]
Miscellaneous:
* For convenience, the manual was split in two parts: the GP user's manual
and the libpari user's manual, the latter being substantially expanded.
Many formerly private functions have been renamed, specified,
cleaned up and documented.
* Initial implementation of the APR-CL primality prover, faster
compositeness tests (BPSW)
* A new set of fast numerical summation and integration routine,
variations on the Ooura-Mori "double exponential" method. See ??intnum
Library interface to all these functions and standard iterators (e.g.
forvec)
* Error messages now mention the GP function where the error occured.
* Input/output and convenience functions: Str(a,1,c) --> "a1c",
Strexpand("~") --> "/home/a2x/belabas", substvec (parallel substitutions),
substpol(expr, x^2, y), writebin (write objets in binary format for
fast retrieval), readvec (load a file's content into a vector)
* Support for new graphic libraries (Qt, FLTK) [ ==> hi-res plots now
also available under Mac OS X and Windows ]
%%%%%%%%%%%%%%%%%%%%%%%%%%%% VERSION 2.1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* PARI/GP is now released under the GNU General Public License.
* PARI now has a CVS server which is intended for PARI lovers who want
the very latest bleeding edge release (see the CVS.txt file).
* Argument checks have been added to prevent unpredictable results when
the input is incorrect.