Commit 03e50bf8 authored by Tobias Hansen's avatar Tobias Hansen

Apply two patches to allow building with PARI 2.9.

parent 34f2c988
lcalc (1.23+dfsg-6) UNRELEASED; urgency=medium
* Apply two patches to allow building with PARI 2.9. (Closes: #841738)
-- Tobias Hansen <thansen@debian.org> Sun, 23 Oct 2016 19:07:06 +0100
lcalc (1.23+dfsg-5) unstable; urgency=medium
* Add patch lcalc-1.23_default_parameters_2.patch from Sage to
......
Description: This is required in order to build against PARI 2.9.
Author: Bill Allombert <ballombe@debian.org>
Bug-Debian: http://bugs.debian.org/841738
--- a/src/Lcommandline_elliptic.cc
+++ b/src/Lcommandline_elliptic.cc
@@ -133,15 +133,15 @@
//gaffsg(a4,(GEN) F[4]);
//gaffsg(a6,(GEN) F[5]);
- gaffect(strtoGEN(a1), (GEN) F[1]);
- gaffect(strtoGEN(a2), (GEN) F[2]);
- gaffect(strtoGEN(a3), (GEN) F[3]);
- gaffect(strtoGEN(a4), (GEN) F[4]);
- gaffect(strtoGEN(a6), (GEN) F[5]);
+ gaffect(gp_read_str(a1), (GEN) F[1]);
+ gaffect(gp_read_str(a2), (GEN) F[2]);
+ gaffect(gp_read_str(a3), (GEN) F[3]);
+ gaffect(gp_read_str(a4), (GEN) F[4]);
+ gaffect(gp_read_str(a6), (GEN) F[5]);
E = ellinit(F, NULL, BIGDEFAULTPREC);
- C=globalreduction(E);
+ C=ellglobalred(E);
x=gtodouble((GEN) C[1]);
@@ -167,8 +167,8 @@
p=n;
gaffsg(p,y);
- coeff[p] = Double(1.*llrint(gtodouble(apell(E,y))))/sqrt(Double(1.*p));
- //coeff[p] = Double(1.*Long(gtodouble(apell(E,y))+.1))/sqrt(Double(1.*p));
+ coeff[p] = Double(1.*llrint(gtodouble(ellap(E,y))))/sqrt(Double(1.*p));
+ //coeff[p] = Double(1.*Long(gtodouble(ellap(E,y))+.1))/sqrt(Double(1.*p));
if(gtolong(gmod((GEN) E[12],(GEN) y))==0) // if p|discriminant, i.e. bad reduction
{
Description: Always use pari_init_stack
This is required in order to build against PARI 2.9.
Author: Bill Allombert <ballombe@debian.org>
Bug-Debian: http://bugs.debian.org/841738
--- a/src/Lcommandline.cc
+++ b/src/Lcommandline.cc
@@ -473,7 +473,11 @@
#ifdef INCLUDE_PARI
if(do_elliptic_curve){
+#if PARI_VERSION_CODE >= PARI_VERSION(2,8,0)
+ paristack_resize((size_t)N_terms*16 + 1000000);
+#else
pari_init_stack((size_t)N_terms*16 + 1000000, top-bot); // Allocate bigger PARI stack
+#endif
if (my_verbose>0) cout << "Will precompute " << N_terms << " elliptic L-function dirichlet coefficients..." << endl;
initialize_new_L(a1,a2,a3,a4,a6,N_terms);
}
......@@ -5,3 +5,5 @@ fix_pari_include.patch
lcalc-1.23_default_parameters_1.patch
init_stack.patch
lcalc-1.23_default_parameters_2.patch
pari-apell.patch
pari-init-stack.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment