[arch-commits] Commit in lcalc/repos (12 files)
Antonio Rojas
arojas at archlinux.org
Wed Oct 19 16:20:20 UTC 2016
Date: Wednesday, October 19, 2016 @ 16:20:19
Author: arojas
Revision: 192600
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
lcalc/repos/community-staging-i686/
lcalc/repos/community-staging-i686/Lcommon.h.patch
(from rev 192599, lcalc/trunk/Lcommon.h.patch)
lcalc/repos/community-staging-i686/PKGBUILD
(from rev 192599, lcalc/trunk/PKGBUILD)
lcalc/repos/community-staging-i686/gcc-4.9.patch
(from rev 192599, lcalc/trunk/gcc-4.9.patch)
lcalc/repos/community-staging-i686/gcc-5.patch
(from rev 192599, lcalc/trunk/gcc-5.patch)
lcalc/repos/community-staging-i686/pari-2.7.patch
(from rev 192599, lcalc/trunk/pari-2.7.patch)
lcalc/repos/community-staging-x86_64/
lcalc/repos/community-staging-x86_64/Lcommon.h.patch
(from rev 192599, lcalc/trunk/Lcommon.h.patch)
lcalc/repos/community-staging-x86_64/PKGBUILD
(from rev 192599, lcalc/trunk/PKGBUILD)
lcalc/repos/community-staging-x86_64/gcc-4.9.patch
(from rev 192599, lcalc/trunk/gcc-4.9.patch)
lcalc/repos/community-staging-x86_64/gcc-5.patch
(from rev 192599, lcalc/trunk/gcc-5.patch)
lcalc/repos/community-staging-x86_64/pari-2.7.patch
(from rev 192599, lcalc/trunk/pari-2.7.patch)
------------------------------------------+
community-staging-i686/Lcommon.h.patch | 23 +++++++++
community-staging-i686/PKGBUILD | 48 ++++++++++++++++++++
community-staging-i686/gcc-4.9.patch | 24 ++++++++++
community-staging-i686/gcc-5.patch | 56 ++++++++++++++++++++++++
community-staging-i686/pari-2.7.patch | 67 +++++++++++++++++++++++++++++
community-staging-x86_64/Lcommon.h.patch | 23 +++++++++
community-staging-x86_64/PKGBUILD | 48 ++++++++++++++++++++
community-staging-x86_64/gcc-4.9.patch | 24 ++++++++++
community-staging-x86_64/gcc-5.patch | 56 ++++++++++++++++++++++++
community-staging-x86_64/pari-2.7.patch | 67 +++++++++++++++++++++++++++++
10 files changed, 436 insertions(+)
Copied: lcalc/repos/community-staging-i686/Lcommon.h.patch (from rev 192599, lcalc/trunk/Lcommon.h.patch)
===================================================================
--- community-staging-i686/Lcommon.h.patch (rev 0)
+++ community-staging-i686/Lcommon.h.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,23 @@
+--- L-1.23/include/Lcommon.h.orig 2011-04-09 04:09:25.984121006 -0300
++++ L-1.23/include/Lcommon.h 2011-04-09 04:09:58.750265003 -0300
+@@ -25,6 +25,8 @@ inline double lcalc_to_double(const Doub
+ #ifdef USE_MPFR
+ inline double lcalc_to_double(const double& x) { return x; }
+ #endif
++
++#if 0
+ //inline double lcalc_to_double(const long double& x) { return x; }
+ inline double lcalc_to_double(const int& x) { return x; }
+ inline double lcalc_to_double(const long long& x) { return x; }
+@@ -33,6 +35,10 @@ inline double lcalc_to_double(const char
+ inline double lcalc_to_double(const long int& x) { return x; }
+ inline double lcalc_to_double(const unsigned int& x) { return x; }
+ inline double lcalc_to_double(const long unsigned int& x) { return x; }
++#else
++# define lcalc_to_double(x) ((double)(x))
++#endif
++
+ #define Int(x) (int)(lcalc_to_double(x))
+ #define Long(x) (Long)(lcalc_to_double(x))
+ #define double(x) (double)(lcalc_to_double(x))
+
\ No newline at end of file
Copied: lcalc/repos/community-staging-i686/PKGBUILD (from rev 192599, lcalc/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=lcalc
+pkgver=1.23
+pkgrel=13
+pkgdesc="C++ L-function class library and command line interface"
+arch=(i686 x86_64)
+url="http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html"
+license=(GPL2)
+depends=(pari-sage)
+makedepends=(chrpath)
+source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz"
+ 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch' 'gcc-5.patch')
+md5sums=('8262d4495e0bbe0283e5341ef8694c23'
+ '8af1dd6d3118bb785f193283a31305a2'
+ '436dd35b06766dffad0941bcfb511e89'
+ '187024b6d6f259209645af68ca8787f2'
+ '88d8a28a75e0bc143d0898f2797d1c54')
+
+prepare() {
+ cd L-$pkgver
+ patch -p1 -i "$srcdir"/Lcommon.h.patch
+ patch -p1 -i "$srcdir"/gcc-4.9.patch
+ patch -p1 -i "$srcdir"/gcc-5.patch
+# port to PARI 2.7 API
+ patch -p1 -i "$srcdir"/pari-2.7.patch
+# Install headers where Sage expects them
+ sed -e 's|include/Lfunction|include/libLfunction|g' -i src/Makefile
+}
+
+build() {
+ cd L-$pkgver/src
+ make PARI_DEFINE="-DINCLUDE_PARI" LOCATION_PARI_H="/usr/include/pari" LOCATION_PARI_LIBRARY="/usr/lib" all
+}
+
+package() {
+ cd L-$pkgver/src
+ mkdir -p "$pkgdir"/usr/{bin,include,lib}
+ make INSTALL_DIR="$pkgdir"/usr install
+
+# remove leftover files
+ rm "$pkgdir"/usr/include/libLfunction/{Lexplicit_formula.h.swap.crap,.*.swp,.DS*}
+# fix wrong permissions
+ chmod 644 "$pkgdir"/usr/include/libLfunction/Ldokchitser.h
+# fix insecure rpath
+ chrpath -d "$pkgdir"/usr/bin/lcalc
+}
Copied: lcalc/repos/community-staging-i686/gcc-4.9.patch (from rev 192599, lcalc/trunk/gcc-4.9.patch)
===================================================================
--- community-staging-i686/gcc-4.9.patch (rev 0)
+++ community-staging-i686/gcc-4.9.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,24 @@
+diff -Naur lcalc-1.23-vanilla/include/Ldirichlet_series.h lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h
+--- lcalc-1.23-vanilla/include/Ldirichlet_series.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h 2014-04-21 14:37:59.027464849 +0200
+@@ -43,7 +43,7 @@
+ //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ template <class ttype>
+ Complex L_function <ttype>::
+-dirichlet_series(Complex s, long long N=-1)
++dirichlet_series(Complex s, long long N)
+ {
+ Complex z=0.;
+ long long m,n;
+diff -Naur lcalc-1.23-vanilla/include/L.h lcalc-1.23-fixed-gcc.4.9/include/L.h
+--- lcalc-1.23-vanilla/include/L.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/L.h 2014-04-21 14:32:04.003467348 +0200
+@@ -491,7 +491,7 @@
+
+ //#include "Ldirichlet_series.h" //for computing Dirichlet series
+ Complex partial_dirichlet_series(Complex s, long long N1, long long N2);
+- Complex dirichlet_series(Complex s, long long N);
++ Complex dirichlet_series(Complex s, long long N=-1LL);
+
+ //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series
+ //void compute_taylor_series(int N, int K, Complex s_0, Complex *series);
Copied: lcalc/repos/community-staging-i686/gcc-5.patch (from rev 192599, lcalc/trunk/gcc-5.patch)
===================================================================
--- community-staging-i686/gcc-5.patch (rev 0)
+++ community-staging-i686/gcc-5.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,56 @@
+--- lcalc-1.23/include/Lgamma.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23/include/Lgamma.h 2014-05-18 21:15:27.786889718 +0200
+@@ -77,7 +77,7 @@
+ //n=0 should just give log_GAMMA(z)... thus making log_GAMMA
+ //code obsolete. But leave log_GAMMA intact anyways.
+ template <class ttype>
+-precise(ttype) log_GAMMA (ttype z,int n=0)
++precise(ttype) log_GAMMA (ttype z,int n)
+ {
+ int M;
+ precise(ttype) log_G,r,r2,y;
+@@ -230,7 +230,7 @@
+ //value exp_w which holds exp(-w)
+ //computes G(z,w), so there's an extra w^(-z) factor.
+ template <class ttype>
+-Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false)
++Complex inc_GAMMA (ttype z,ttype w, const char *method, ttype exp_w, bool recycle)
+ {
+
+ Complex G;
+@@ -334,7 +334,7 @@
+
+
+ template <class ttype>
+-ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w=0, bool recycle=false) //computes G(z,w) via continued fraction
++ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via continued fraction
+ {
+
+ ttype G;
+@@ -424,7 +424,7 @@
+ }
+
+ template <class ttype>
+-ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w = 0, bool recycle=false) //computes G(z,w) via asymptotic series
++ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via asymptotic series
+ {
+
+ if(my_verbose>3) cout << "called asympt_GAMMA("<<z<<","<<w<<")"<< endl;
+@@ -446,7 +446,7 @@
+
+
+ template <class ttype>
+-ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w = 0, bool recycle=false) //computes g(z,w)
++ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w, bool recycle) //computes g(z,w)
+ {
+
+ ttype g;
+@@ -604,7 +604,7 @@
+ }
+
+ template <class ttype>
+-Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme")
++Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta, const char *method)
+ {
+ Complex SUM=0;
+
Copied: lcalc/repos/community-staging-i686/pari-2.7.patch (from rev 192599, lcalc/trunk/pari-2.7.patch)
===================================================================
--- community-staging-i686/pari-2.7.patch (rev 0)
+++ community-staging-i686/pari-2.7.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,67 @@
+--- src/src/Lcommandline_elliptic.cc 2010-01-31 16:16:45.000000000 +0100
++++ src/src/Lcommandline_elliptic.cc 2011-05-10 17:08:10.000000000 +0200
+@@ -121,11 +121,11 @@
+
+
+ F = cgetg(6, t_VEC);
+- F[1] = lgeti(BIGDEFAULTPREC);
+- F[2] = lgeti(BIGDEFAULTPREC);
+- F[3] = lgeti(BIGDEFAULTPREC);
+- F[4] = lgeti(BIGDEFAULTPREC);
+- F[5] = lgeti(BIGDEFAULTPREC);
++ F[1] = (long)cgeti(BIGDEFAULTPREC);
++ F[2] = (long)cgeti(BIGDEFAULTPREC);
++ F[3] = (long)cgeti(BIGDEFAULTPREC);
++ F[4] = (long)cgeti(BIGDEFAULTPREC);
++ F[5] = (long)cgeti(BIGDEFAULTPREC);
+
+ //gaffsg(a1,(GEN) F[1]);
+ //gaffsg(a2,(GEN) F[2]);
+@@ -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 = initell(F,BIGDEFAULTPREC);
++ 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
+ {
+diff -ru src/src/Lcommandline.cc b/src/Lcommandline.cc
+--- src/src/Lcommandline.cc 2012-08-08 23:21:56.000000000 +0200
++++ b/src/Lcommandline.cc 2014-01-06 14:02:19.463388366 +0100
+@@ -473,7 +473,9 @@
+
+ #ifdef INCLUDE_PARI
+ if(do_elliptic_curve){
+- allocatemoremem((int) N_terms*16+1000000); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++ // Reallocate PARI stack
++ paristack_setsize((size_t)N_terms*16 + 1000000, 0); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++
+ 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);
+ }
Copied: lcalc/repos/community-staging-x86_64/Lcommon.h.patch (from rev 192599, lcalc/trunk/Lcommon.h.patch)
===================================================================
--- community-staging-x86_64/Lcommon.h.patch (rev 0)
+++ community-staging-x86_64/Lcommon.h.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,23 @@
+--- L-1.23/include/Lcommon.h.orig 2011-04-09 04:09:25.984121006 -0300
++++ L-1.23/include/Lcommon.h 2011-04-09 04:09:58.750265003 -0300
+@@ -25,6 +25,8 @@ inline double lcalc_to_double(const Doub
+ #ifdef USE_MPFR
+ inline double lcalc_to_double(const double& x) { return x; }
+ #endif
++
++#if 0
+ //inline double lcalc_to_double(const long double& x) { return x; }
+ inline double lcalc_to_double(const int& x) { return x; }
+ inline double lcalc_to_double(const long long& x) { return x; }
+@@ -33,6 +35,10 @@ inline double lcalc_to_double(const char
+ inline double lcalc_to_double(const long int& x) { return x; }
+ inline double lcalc_to_double(const unsigned int& x) { return x; }
+ inline double lcalc_to_double(const long unsigned int& x) { return x; }
++#else
++# define lcalc_to_double(x) ((double)(x))
++#endif
++
+ #define Int(x) (int)(lcalc_to_double(x))
+ #define Long(x) (Long)(lcalc_to_double(x))
+ #define double(x) (double)(lcalc_to_double(x))
+
\ No newline at end of file
Copied: lcalc/repos/community-staging-x86_64/PKGBUILD (from rev 192599, lcalc/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,48 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgname=lcalc
+pkgver=1.23
+pkgrel=13
+pkgdesc="C++ L-function class library and command line interface"
+arch=(i686 x86_64)
+url="http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/L.html"
+license=(GPL2)
+depends=(pari-sage)
+makedepends=(chrpath)
+source=("http://oto.math.uwaterloo.ca/~mrubinst/L_function_public/CODE/L-$pkgver.tar.gz"
+ 'Lcommon.h.patch' 'gcc-4.9.patch' 'pari-2.7.patch' 'gcc-5.patch')
+md5sums=('8262d4495e0bbe0283e5341ef8694c23'
+ '8af1dd6d3118bb785f193283a31305a2'
+ '436dd35b06766dffad0941bcfb511e89'
+ '187024b6d6f259209645af68ca8787f2'
+ '88d8a28a75e0bc143d0898f2797d1c54')
+
+prepare() {
+ cd L-$pkgver
+ patch -p1 -i "$srcdir"/Lcommon.h.patch
+ patch -p1 -i "$srcdir"/gcc-4.9.patch
+ patch -p1 -i "$srcdir"/gcc-5.patch
+# port to PARI 2.7 API
+ patch -p1 -i "$srcdir"/pari-2.7.patch
+# Install headers where Sage expects them
+ sed -e 's|include/Lfunction|include/libLfunction|g' -i src/Makefile
+}
+
+build() {
+ cd L-$pkgver/src
+ make PARI_DEFINE="-DINCLUDE_PARI" LOCATION_PARI_H="/usr/include/pari" LOCATION_PARI_LIBRARY="/usr/lib" all
+}
+
+package() {
+ cd L-$pkgver/src
+ mkdir -p "$pkgdir"/usr/{bin,include,lib}
+ make INSTALL_DIR="$pkgdir"/usr install
+
+# remove leftover files
+ rm "$pkgdir"/usr/include/libLfunction/{Lexplicit_formula.h.swap.crap,.*.swp,.DS*}
+# fix wrong permissions
+ chmod 644 "$pkgdir"/usr/include/libLfunction/Ldokchitser.h
+# fix insecure rpath
+ chrpath -d "$pkgdir"/usr/bin/lcalc
+}
Copied: lcalc/repos/community-staging-x86_64/gcc-4.9.patch (from rev 192599, lcalc/trunk/gcc-4.9.patch)
===================================================================
--- community-staging-x86_64/gcc-4.9.patch (rev 0)
+++ community-staging-x86_64/gcc-4.9.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,24 @@
+diff -Naur lcalc-1.23-vanilla/include/Ldirichlet_series.h lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h
+--- lcalc-1.23-vanilla/include/Ldirichlet_series.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h 2014-04-21 14:37:59.027464849 +0200
+@@ -43,7 +43,7 @@
+ //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ template <class ttype>
+ Complex L_function <ttype>::
+-dirichlet_series(Complex s, long long N=-1)
++dirichlet_series(Complex s, long long N)
+ {
+ Complex z=0.;
+ long long m,n;
+diff -Naur lcalc-1.23-vanilla/include/L.h lcalc-1.23-fixed-gcc.4.9/include/L.h
+--- lcalc-1.23-vanilla/include/L.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23-fixed-gcc.4.9/include/L.h 2014-04-21 14:32:04.003467348 +0200
+@@ -491,7 +491,7 @@
+
+ //#include "Ldirichlet_series.h" //for computing Dirichlet series
+ Complex partial_dirichlet_series(Complex s, long long N1, long long N2);
+- Complex dirichlet_series(Complex s, long long N);
++ Complex dirichlet_series(Complex s, long long N=-1LL);
+
+ //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series
+ //void compute_taylor_series(int N, int K, Complex s_0, Complex *series);
Copied: lcalc/repos/community-staging-x86_64/gcc-5.patch (from rev 192599, lcalc/trunk/gcc-5.patch)
===================================================================
--- community-staging-x86_64/gcc-5.patch (rev 0)
+++ community-staging-x86_64/gcc-5.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,56 @@
+--- lcalc-1.23/include/Lgamma.h 2012-08-08 23:21:55.000000000 +0200
++++ lcalc-1.23/include/Lgamma.h 2014-05-18 21:15:27.786889718 +0200
+@@ -77,7 +77,7 @@
+ //n=0 should just give log_GAMMA(z)... thus making log_GAMMA
+ //code obsolete. But leave log_GAMMA intact anyways.
+ template <class ttype>
+-precise(ttype) log_GAMMA (ttype z,int n=0)
++precise(ttype) log_GAMMA (ttype z,int n)
+ {
+ int M;
+ precise(ttype) log_G,r,r2,y;
+@@ -230,7 +230,7 @@
+ //value exp_w which holds exp(-w)
+ //computes G(z,w), so there's an extra w^(-z) factor.
+ template <class ttype>
+-Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false)
++Complex inc_GAMMA (ttype z,ttype w, const char *method, ttype exp_w, bool recycle)
+ {
+
+ Complex G;
+@@ -334,7 +334,7 @@
+
+
+ template <class ttype>
+-ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w=0, bool recycle=false) //computes G(z,w) via continued fraction
++ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via continued fraction
+ {
+
+ ttype G;
+@@ -424,7 +424,7 @@
+ }
+
+ template <class ttype>
+-ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w = 0, bool recycle=false) //computes G(z,w) via asymptotic series
++ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via asymptotic series
+ {
+
+ if(my_verbose>3) cout << "called asympt_GAMMA("<<z<<","<<w<<")"<< endl;
+@@ -446,7 +446,7 @@
+
+
+ template <class ttype>
+-ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w = 0, bool recycle=false) //computes g(z,w)
++ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w, bool recycle) //computes g(z,w)
+ {
+
+ ttype g;
+@@ -604,7 +604,7 @@
+ }
+
+ template <class ttype>
+-Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme")
++Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta, const char *method)
+ {
+ Complex SUM=0;
+
Copied: lcalc/repos/community-staging-x86_64/pari-2.7.patch (from rev 192599, lcalc/trunk/pari-2.7.patch)
===================================================================
--- community-staging-x86_64/pari-2.7.patch (rev 0)
+++ community-staging-x86_64/pari-2.7.patch 2016-10-19 16:20:19 UTC (rev 192600)
@@ -0,0 +1,67 @@
+--- src/src/Lcommandline_elliptic.cc 2010-01-31 16:16:45.000000000 +0100
++++ src/src/Lcommandline_elliptic.cc 2011-05-10 17:08:10.000000000 +0200
+@@ -121,11 +121,11 @@
+
+
+ F = cgetg(6, t_VEC);
+- F[1] = lgeti(BIGDEFAULTPREC);
+- F[2] = lgeti(BIGDEFAULTPREC);
+- F[3] = lgeti(BIGDEFAULTPREC);
+- F[4] = lgeti(BIGDEFAULTPREC);
+- F[5] = lgeti(BIGDEFAULTPREC);
++ F[1] = (long)cgeti(BIGDEFAULTPREC);
++ F[2] = (long)cgeti(BIGDEFAULTPREC);
++ F[3] = (long)cgeti(BIGDEFAULTPREC);
++ F[4] = (long)cgeti(BIGDEFAULTPREC);
++ F[5] = (long)cgeti(BIGDEFAULTPREC);
+
+ //gaffsg(a1,(GEN) F[1]);
+ //gaffsg(a2,(GEN) F[2]);
+@@ -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 = initell(F,BIGDEFAULTPREC);
++ 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
+ {
+diff -ru src/src/Lcommandline.cc b/src/Lcommandline.cc
+--- src/src/Lcommandline.cc 2012-08-08 23:21:56.000000000 +0200
++++ b/src/Lcommandline.cc 2014-01-06 14:02:19.463388366 +0100
+@@ -473,7 +473,9 @@
+
+ #ifdef INCLUDE_PARI
+ if(do_elliptic_curve){
+- allocatemoremem((int) N_terms*16+1000000); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++ // Reallocate PARI stack
++ paristack_setsize((size_t)N_terms*16 + 1000000, 0); //XXXXXXXXX this should depend on whether we're double or long double or mpfr double
++
+ 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);
+ }
More information about the arch-commits
mailing list