diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2020-03-30 12:40:37 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2020-03-30 12:40:37 +0000 |
commit | d9d39e0a5bc6edefd4a4abb1a12d94e08730ecff (patch) | |
tree | ab5fb79451e1c558c37da987e0c0dfe0c3311706 /math/lcalc/files/patch-src_Lcommandline__elliptic.cc | |
parent | Upgrade to v.2.9.0. (diff) |
Adding lcalc, the L-function c++ class library and, the command line program
lcalc, to be used by SageMath.
Remark: this is not the latest version, but the one currently used by Sage,
with their patches.
Notes
Notes:
svn path=/head/; revision=529880
Diffstat (limited to 'math/lcalc/files/patch-src_Lcommandline__elliptic.cc')
-rw-r--r-- | math/lcalc/files/patch-src_Lcommandline__elliptic.cc | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/math/lcalc/files/patch-src_Lcommandline__elliptic.cc b/math/lcalc/files/patch-src_Lcommandline__elliptic.cc new file mode 100644 index 000000000000..3b5afe596d23 --- /dev/null +++ b/math/lcalc/files/patch-src_Lcommandline__elliptic.cc @@ -0,0 +1,62 @@ +--- src/Lcommandline_elliptic.cc.orig 2012-08-08 21:21:56 UTC ++++ src/Lcommandline_elliptic.cc +@@ -18,6 +18,8 @@ + with the package; see the file 'COPYING'. If not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ++ Patches borrowed from SageMath. ++ + */ + + #include "Lcommandline_elliptic.h" +@@ -121,11 +123,11 @@ void data_E(char *a1, char *a2, char *a3, char *a4, ch + + + 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 +135,15 @@ void data_E(char *a1, char *a2, char *a3, char *a4, ch + //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 +169,8 @@ void data_E(char *a1, char *a2, char *a3, char *a4, ch + + 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 + { |