diff -Nru eclib-20190909/binder/postBuild eclib-20210625/binder/postBuild --- eclib-20190909/binder/postBuild 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/binder/postBuild 2021-06-25 09:53:34.000000000 +0000 @@ -2,17 +2,23 @@ # Our conda env has the necessary dependencies, so propagate them # for the build below -export PREFIX=$CONDA_DIR +export PREFIX="$CONDA_DEFAULT_ENV" # For now, we need an alpha version of JupyterLab. Can be removed later. pip install --pre -U jupyterlab +echo "configuring eclib with PREFIX=$PREFIX" # Configure eclib with autotools export CONFIGURE_OPTS="--disable-mpfp" export CPPFLAGS="-I$PREFIX/include $CPPFLAGS" export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib $LDFLAGS" +echo "environment" +echo "===========" +env | sort +echo + chmod +x autogen.sh ./autogen.sh diff -Nru eclib-20190909/configure.ac eclib-20210625/configure.ac --- eclib-20190909/configure.ac 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/configure.ac 2021-06-25 09:53:34.000000000 +0000 @@ -3,7 +3,12 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) -AC_INIT([eclib], [20190226], [john.cremona@gmail.com]) + +# The version is the concatenation of 'v' and the year, month, date: vyyyymmdd +# To access this as a string or integer triple, see libsrc/eclib/version.h + +AC_INIT([eclib], [20210625], [john.cremona@gmail.com]) + AM_INIT_AUTOMAKE([-Wall]) AC_MSG_NOTICE([Configuring eclib...]) AC_CONFIG_SRCDIR([libsrc]) @@ -35,9 +40,9 @@ # # NB The suffix of the library name (libec.so here) is (c-a).a.r -LT_CURRENT=5 -LT_REVISION=1 -LT_AGE=0 +LT_CURRENT=9 +LT_REVISION=3 +LT_AGE=1 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) @@ -151,14 +156,15 @@ AC_SUBST(NTL_CFLAGS) AC_SUBST(NTL_LDFLAGS) +AC_ARG_VAR(FLINT_LEVEL, "FLINT level parameter (default 1 if FLINT enabled)") + dnl Find the FLINT Library and determine if it has the nmod_mat module dnl (in FLINT from version 2.3) dnl dnl NB If your version of FLINT includes the optional hmod_mat module, -dnl then compile with FLINT_LEVEL=2 by either using configure as usual -dnl and then doing "make CXXFLAGS='-DFLINT_LEVEL=2'", or adding -dnl CXXFLAGS='-DFLINT_LEVEL=2' to the ./configure command. In either -dnl case, ignore the warnings about FLINT_LEVEL being redfined. +dnl then configure with FLINT_LEVEL=2 by either setting the +dnl environment variable FLINT_LEVEL to 2, or adding FLINT_LEVEL=2 to +dnl the configure invocation. dnl dnl First set defaults for when no suitable FLINT is found dnl @@ -170,14 +176,14 @@ elif test "$withval" = "yes" -o "$withval" = ""; then want_flint=yes AC_CHECK_LIB([flint], [fmpz_init, nmod_mat_rref], - [FLINT_CFLAGS="-DFLINT_LEVEL=1"; + [FLINT_CFLAGS="-DFLINT_LEVEL=${FLINT_LEVEL:=1}"; FLINT_LIBS="-lflint"; AC_MSG_NOTICE([Building with FLINT support from system install])], [AC_MSG_NOTICE([No suitable FLINT Library (version >=2.3) found])], []) else want_flint=yes - FLINT_CFLAGS="-DFLINT_LEVEL=1 -I$withval/include" + FLINT_CFLAGS="-DFLINT_LEVEL=${FLINT_LEVEL:=1} -I$withval/include" FLINT_LDFLAGS="-L$withval/lib"; FLINT_LIBS="-lflint" fi @@ -238,5 +244,6 @@ doc/Makefile man/Makefile Makefile + eclib.pc ]) AC_OUTPUT diff -Nru eclib-20190909/debian/changelog eclib-20210625/debian/changelog --- eclib-20190909/debian/changelog 2020-11-19 12:29:29.000000000 +0000 +++ eclib-20210625/debian/changelog 2021-11-08 19:06:08.000000000 +0000 @@ -1,8 +1,51 @@ -eclib (20190909-3build1) hirsute; urgency=medium +eclib (20210625-1build1) jammy; urgency=medium - * No-change upload for pari soname change. + * No-change rebuild against libntl44 - -- Matthias Klose Thu, 19 Nov 2020 13:29:29 +0100 + -- Steve Langasek Mon, 08 Nov 2021 19:06:08 +0000 + +eclib (20210625-1) unstable; urgency=medium + + * New upstream release. + * Update the soname version. + + -- Julien Puydt Tue, 17 Aug 2021 11:28:29 +0200 + +eclib (20210503-1) experimental; urgency=medium + + * New upstream release. + + -- Julien Puydt Mon, 03 May 2021 21:53:41 +0200 + +eclib (20210415-1) experimental; urgency=medium + + * Update d/watch to handle upstream changing version tags. + * New upstream release. + + -- Julien Puydt Sat, 01 May 2021 13:31:24 +0200 + +eclib (20210310-1) experimental; urgency=medium + + * New upstream release. + + -- Julien Puydt Fri, 12 Mar 2021 13:07:22 +0100 + +eclib (20210226-1) experimental; urgency=medium + + * Bump standards-version to 4.5.1. + * Bump dh compat to 13. + * Drop the obsolete lintian overrides. + * Declare d/rules doesn't require root. + * New upstream release. + * Drop now-obsolete patch. + * Make dh_missing stop complaining about mwrank.1. + * Install the devel documentation with the -dev package. + * Install the pkg-config file in the -dev package. + * Don't ship the la file. + * Update the soname version. + * Drop last lintian override. + + -- Julien Puydt Wed, 03 Mar 2021 11:07:28 +0100 eclib (20190909-3) unstable; urgency=medium diff -Nru eclib-20190909/debian/control eclib-20210625/debian/control --- eclib-20190909/debian/control 2020-04-05 08:00:51.000000000 +0000 +++ eclib-20210625/debian/control 2021-11-08 19:06:08.000000000 +0000 @@ -1,15 +1,17 @@ Source: eclib -Maintainer: Debian Science Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Science Maintainers Uploaders: Julien Puydt Section: math Priority: optional -Standards-Version: 4.5.0 +Standards-Version: 4.5.1 Homepage: https://github.com/JohnCremona/eclib/ -Build-Depends: debhelper-compat (= 12), libntl-dev, libpari-dev +Build-Depends: debhelper-compat (= 13), libntl-dev, libpari-dev +Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/science-team/eclib.git Vcs-Browser: https://salsa.debian.org/science-team/eclib -Package: libec5 +Package: libec8 Section: libs Architecture: any Multi-Arch: same @@ -26,7 +28,7 @@ Architecture: any Multi-Arch: same Section: libdevel -Depends: ${misc:Depends}, libec5 (= ${binary:Version}) +Depends: ${misc:Depends}, libec8 (= ${binary:Version}) Description: Library for modular symbols and elliptic curves over Q (development) This library implements 2-descent on elliptic curves over Q and computations with modular symbols. @@ -35,7 +37,7 @@ Package: eclib-tools Architecture: any -Depends: libec5 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: libec8 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Breaks: sagemath (<< 8.4~) Description: Programs for modular symbols and elliptic curves over Q This package includes several programs to compute with elliptic curves diff -Nru eclib-20190909/debian/eclib-tools.lintian-overrides eclib-20210625/debian/eclib-tools.lintian-overrides --- eclib-20190909/debian/eclib-tools.lintian-overrides 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/eclib-tools.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# Those warnings make no sense for a package which is about -# scientific computation -eclib-tools binary: hardening-no-stackprotector -# Upstream's ChangeLog is empty anyway -eclib-tools binary: no-upstream-changelog diff -Nru eclib-20190909/debian/eclib-tools.manpages eclib-20210625/debian/eclib-tools.manpages --- eclib-20190909/debian/eclib-tools.manpages 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/eclib-tools.manpages 2021-08-17 09:28:29.000000000 +0000 @@ -1 +1 @@ -man/mwrank.1 +usr/share/man/man1/mwrank.1 diff -Nru eclib-20190909/debian/libec5.install eclib-20210625/debian/libec5.install --- eclib-20190909/debian/libec5.install 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/libec5.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/usr/lib/*/*.so.* diff -Nru eclib-20190909/debian/libec5.lintian-overrides eclib-20210625/debian/libec5.lintian-overrides --- eclib-20190909/debian/libec5.lintian-overrides 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/libec5.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Upstream's ChangeLog is empty anyway -libec5 binary: no-upstream-changelog diff -Nru eclib-20190909/debian/libec5.shlibs eclib-20210625/debian/libec5.shlibs --- eclib-20190909/debian/libec5.shlibs 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/libec5.shlibs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -libec 5 libec5 diff -Nru eclib-20190909/debian/libec8.install eclib-20210625/debian/libec8.install --- eclib-20190909/debian/libec8.install 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/debian/libec8.install 2021-08-17 09:28:29.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/*/*.so.* diff -Nru eclib-20190909/debian/libec8.shlibs eclib-20210625/debian/libec8.shlibs --- eclib-20190909/debian/libec8.shlibs 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/debian/libec8.shlibs 2021-08-17 09:28:29.000000000 +0000 @@ -0,0 +1 @@ +libec 8 libec8 diff -Nru eclib-20190909/debian/libec-dev.install eclib-20210625/debian/libec-dev.install --- eclib-20190909/debian/libec-dev.install 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/libec-dev.install 2021-08-17 09:28:29.000000000 +0000 @@ -1,2 +1,4 @@ /usr/include/* /usr/lib/*/*.so +usr/share/doc/eclib/* +usr/lib/*/pkgconfig/*.pc diff -Nru eclib-20190909/debian/libec-dev.lintian-overrides eclib-20210625/debian/libec-dev.lintian-overrides --- eclib-20190909/debian/libec-dev.lintian-overrides 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/libec-dev.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Upstream's ChangeLog is empty anyway -libec-dev binary: no-upstream-changelog diff -Nru eclib-20190909/debian/patches/clearer_longify.patch eclib-20210625/debian/patches/clearer_longify.patch --- eclib-20190909/debian/patches/clearer_longify.patch 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/patches/clearer_longify.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -Author: Julien Puydt -Description: a switch without default makes the compiler itchy (and could give a bug in the future) -Forwarded: https://github.com/JohnCremona/issues/61 - ---- eclib.orig/libsrc/interface.cc -+++ eclib/libsrc/interface.cc -@@ -318,6 +318,9 @@ - a = I2long(CeilToZZ(x)); return 1; - case -1: // round down - a = I2long(FloorToZZ(x)); return 1; -+ default: // should be unused! -+ cerr<<"Attempt to round with unknown method fails!" << endl; -+ return 0; - } - } - else -@@ -345,6 +348,9 @@ - a = - (long)(-x+0.5); return 1; - case -1: // round down - a = (long)x; return 1; -+ default: // should be unused! -+ cerr<<"Attempt to round with unknown method fails!" << endl; -+ return 0; - } - } - else -@@ -357,6 +363,9 @@ - a = (long)x; return 1; - case -1: // round down - a = (long)(x-0.5); return 1; -+ default: // should be unused! -+ cerr<<"Attempt to round with unknown method fails!" << endl; -+ return 0; - } - } - } diff -Nru eclib-20190909/debian/patches/pari_size.patch eclib-20210625/debian/patches/pari_size.patch --- eclib-20190909/debian/patches/pari_size.patch 2020-04-04 18:43:51.000000000 +0000 +++ eclib-20210625/debian/patches/pari_size.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -Description: use a better parisize setting, fixing FTBFS on some arches -Author: Julien Puydt -Forwarded: https://github.com/JohnCremona/eclib/issues/63 - ---- eclib.orig/libsrc/parifact.cc -+++ eclib/libsrc/parifact.cc -@@ -35,9 +35,9 @@ - factor(const string n) - { - if (!avma) { -- long pari_size = strtol(getenv_with_default("PARI_SIZE", "1000000000").c_str(), NULL, 0); -+ long pari_size = strtol(getenv_with_default("PARI_SIZE", "4000000").c_str(), NULL, 0); - if (pari_size==0) // e.g. syntax error in the environment variable PARI_SIZE -- pari_size = 1000000000; -+ pari_size = 4000000; - #ifdef DEBUG_GPFACT - std::cout<<"calling pari_init with pari_size = "< introotscubic(long a, long b, long c, int& nr) -{ bigcomplex za(to_bigfloat(a)), zb(to_bigfloat(b)), zc(to_bigfloat(c)); - vector croots = solvecubic(za,zb,zc); - vector iroots; - int i; long x,cx; - for (i=0; i<3; i++) - { - cout << "Complex root = " << croots[i] << endl; - bigfloat xx = croots[i].real(); - Iasb(x,xx); - cout << "Rounds to " << x << endl; - if (x==0) {if (c==0) iroots.push_back(x);} - else - { - cx = c/x; - if (x*cx==c) - if (((x+a)*x+b+cx) == 0) - iroots.push_back(x); - } - } - return iroots; -} diff -Nru eclib-20190909/libsrc/cperiods.cc eclib-20210625/libsrc/cperiods.cc --- eclib-20190909/libsrc/cperiods.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/cperiods.cc 2021-06-25 09:53:34.000000000 +0000 @@ -108,7 +108,7 @@ //Returns an array of 3 complex roots. { #ifdef DEBUG_CUBIC -cout << "In solve_nonsingular_cubic with c1 = "< #include #include +#include void cubic::init() { @@ -194,8 +195,10 @@ bigint a2=a*a; bigint c2=c*c; bigint c3=c*c2; + bigint c4=c2*c2; + bigint d2=d*d; - return 27*d*c3*a2 + (27*d^2*b3 - 54*d*c2*b2 + 9*c^4*b)*a + 9*d*c*b4 - 2*c3*b3; + return 27*d*c3*a2 + (27*d2*b3 - 54*d*c2*b2 + 9*c4*b)*a + 9*d*c*b4 - 2*c3*b3; } //#define DEBUG @@ -308,7 +311,7 @@ if(a()<0) negate(m); } -int cubic::is_jc_reduced() // for positive discriminant only +int cubic::is_jc_reduced() // for negative discriminant only { bigint C1 = j_c1(); if (C1<0) return 0; @@ -324,38 +327,98 @@ { int s=1; bigint k, jc2, jc3; bigint plus1, minus1; plus1=1; minus1=-1; + + bigfloat alpha, ra, rb, rc, rd, h0, h1, h2; + m.reset(); +#ifdef DEBUG + cout << "\nJC-reducing " << (*this) << "...\n"; + cout<<"C1="< " << (*this) << endl; + cout<<"C1="<0) || (j_c3()<0)) { s=1; - bigfloat alpha = real_root(); - bigfloat ra = I2bigfloat(a()); - bigfloat rb = I2bigfloat(b()); - bigfloat rc = I2bigfloat(c()); - bigfloat h0 = (9*ra*ra*alpha + 6*ra*rb)*alpha + 6*ra*rc-rb*rb; - bigfloat h1 = 6*(ra*rb*alpha + (rb*rb-ra*rc))*alpha + 2*rb*rc; -#ifdef DEBUG - cout << "h0 = "< "<<(*this)< "<<(*this)< "<<(*this)< " << (*this) << endl; + cout<<"C1="<1) cout<<"a=0, b<="<1) && glist.size()==0) cout<1) { @@ -547,8 +638,9 @@ U = (sU? -absU: absU); if(::divides(U-Ud,27*a2,d,r)) { - if (verbose && glist.size()==0) cout<1 && glist.size()==0) cout<1) cout<<"found "<1) @@ -570,7 +662,7 @@ if (verbose) { cout << glist.size() << " cubics found with discriminant " << disc << "."; - if (glist.size()>0) cout <<" Now reducing and eliminating repeats..."; + if (glist.size()>0) cout << glist << "\n Now reducing and eliminating repeats..."; cout<1) cout<<": testing JC-reduction..."< #include // which includes // constructors @@ -89,22 +90,29 @@ } } -void curvemodq::set_group_order() +void curvemodq::set_group_order() { - if(((this->q)<100)||((this->q)==181)||((this->q)==331)||((this->q)==547)) - { - set_group_order_via_legendre(); - return; - } - pointmodq P1, P2; - bigint n1, n2, n; - my_isomorphism_type(*this,n1,n2,P1,P2); - order=n1*n2; + // if(((this->q)<100)||((this->q)==181)||((this->q)==331)||((this->q)==547)) + // { + // set_group_order_via_legendre(); + // return; + // } + + long a1z = I2long(conv(a1)); + long a2z = I2long(conv(a2)); + long a3z = I2long(conv(a3)); + long a4z = I2long(conv(a4)); + long a6z = I2long(conv(a6)); + long p = I2long(q); + order = 1+q-ellap(a1z,a2z,a3z,a4z,a6z,p); + // pointmodq P1, P2; + // bigint n1, n2, n; + // my_isomorphism_type(*this,n1,n2,P1,P2); + // order=n1*n2; } // Division poly functions: - FqPoly makepdivpol(const curvemodq& C, int p) { if(p==2) diff -Nru eclib-20190909/libsrc/curvered.cc eclib-20210625/libsrc/curvered.cc --- eclib-20190909/libsrc/curvered.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/curvered.cc 2021-06-25 09:53:34.000000000 +0000 @@ -333,6 +333,44 @@ return; } // end of Tate's algorithm +// The local Tamagawa exponent -- same as Tamagawa number unless the +// component group is (2,2). Use p=0 for reals +bigint local_Tamagawa_exponent(CurveRed& c, const bigint& p) +{ + if (is_zero(p)) return BIGINT(c.conncomp); + map::const_iterator ri = c.reduct_array.find(p); + if (ri == c.reduct_array.end()) + return BIGINT(1); + Reduction_type info = ri->second; + int cp = info.c_p; + if (cp!=4) + return BIGINT(cp); + // see if we have C4 or C2xC2 + int code = info.Kcode.code; + return BIGINT(code%20==1? 2: 4); // Type I*m, m even: [2,2], else 4 +} + +// The global Tamagawa exponent, i.e. the lcm of the exponents of +// the component groups at all bad primes (including infinity if +// real_too is 1), which is the lcm of the local Tamagawa exponents. +// So (with no further knowledge of the MW group) we know that m*P +// is in the good-reduction subgroup for all P, with this m. + +bigint global_Tamagawa_exponent(CurveRed& c, int real_too) +{ + const bigint one = BIGINT(1); + const bigint two = BIGINT(2); + bigint ans = ((real_too && (c.conncomp==2))? two: one); + + for(map::const_iterator ri = c.reduct_array.begin(); ri!=c.reduct_array.end(); ri++) + { + Reduction_type info = ri->second; + int code = info.Kcode.code; + int ep = (code%20==1? 2: info.c_p); // Type I*m, m even: [2,2] + ans = lcm(ans,BIGINT(ep)); + } + return ans; +} // CurveRed member access friend functions: @@ -371,9 +409,9 @@ return (ri->second).c_p; } -int prodcp(const CurveRed& c) +bigint prodcp(const CurveRed& c) { - int ans=1; + bigint ans = BIGINT(1); map::const_iterator ri; for(ri = c.reduct_array.begin(); ri!=c.reduct_array.end(); ri++) { @@ -382,6 +420,18 @@ return ans; } +// The local Tamagawa number. Use p=0 for reals +bigint local_Tamagawa_number(CurveRed& c, const bigint& p) +{ + return BIGINT(is_zero(p)? c.conncomp: getc_p(c,p)); +} + +// The global Tamagawa number, = product of local ones. +bigint global_Tamagawa_number(CurveRed& c, int real_too) +{ + return BIGINT(prodcp(c) * (real_too ? c.conncomp : 1)); +} + Kodaira_code getKodaira_code(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); diff -Nru eclib-20190909/libsrc/descent.cc eclib-20210625/libsrc/descent.cc --- eclib-20190909/libsrc/descent.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/descent.cc 2021-06-25 09:53:34.000000000 +0000 @@ -157,7 +157,7 @@ } } -void two_descent::saturate(long sat_bd) +void two_descent::saturate(long sat_bd, long sat_low_bd) { // Do a quick search for points on the curve before processing points @@ -201,9 +201,9 @@ { // Saturate if(verbose) cout <<"Saturating (with bound = "< unsat; - int sat_ok = mwbasis->saturate(index,unsat,sat_bd,1); - // The last parameter 1 says not to bother with 2-saturation! + long index; vector unsat; + int sat_ok = mwbasis->saturate(index,unsat,sat_bd,sat_low_bd); + // no need to check p-saturation for p<=sat_low_bd (default 2) if(verbose) cout <<"done:"< #include -vector makepdivpol(Curvedata* E, int p) -{ - if(p==2) - { - bigint b2,b4,b6,b8; - E->getbi(b2,b4,b6,b8); - vector ans; - ans.reserve(4); - ans.push_back(b6); - ans.push_back(2*b4); - ans.push_back(b2); - ans.push_back(BIGINT(4)); - return ans; - } - - // default for odd p: use recursive method +// The 2-divison polynomial (cubic in x) - bigint a1,a2,a3,a4,a6; - E->getai(a1,a2,a3,a4,a6); - return div_pol_odd(a1,a2,a3,a4,a6,p); +ZPoly div_pol_2(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6) +{ + ZPoly ans; + SetDegree(ans,3); + SetCoeff(ans,3,4); + SetCoeff(ans,2,a1*a1+4*a2); + SetCoeff(ans,1,2*a1*a3+4*a4); + SetCoeff(ans,0,a3*a3+4*a6); + return ans; } // div_pol_odd(a1,a2,a3,a4,a6,n) returns the coefficients of the @@ -55,22 +47,9 @@ // points P on E=[a1,a2,a3,a4,a6] satisfying nP=0 (odd n) // The poly itself is found recursively - -ZPoly div_pol_odd_rec(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, - const bigint& a6, int n); - -vector div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, - const bigint& a6, int n) -{ - ZPoly pol = div_pol_odd_rec(a1,a2,a3,a4,a6,n); - int i, d = Degree(pol); - vector ans; ans.reserve(d+1); - for(i=0; i<=d; i++) ans.push_back(PolyCoeff(pol,i)); - return ans; -} -ZPoly div_pol_odd_rec(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, - const bigint& a6, int n) +ZPoly div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, int n) { ZPoly X; ZPolySetX(X); ZPoly f1 = X*(X*(X+a2)+a4)+a6; @@ -105,22 +84,73 @@ if(n%2==1) { int m=(n-1)/2; - ZPoly t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m); - t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m+2)*t1*t1*t1; - ZPoly t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m+1); - t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m-1)*t2*t2*t2; + ZPoly t1=div_pol_odd(a1,a2,a3,a4,a6,m); + t1=div_pol_odd(a1,a2,a3,a4,a6,m+2)*t1*t1*t1; + ZPoly t2=div_pol_odd(a1,a2,a3,a4,a6,m+1); + t2=div_pol_odd(a1,a2,a3,a4,a6,m-1)*t2*t2*t2; if(m%2==1) return t1-psi24*t2; return psi24*t1-t2; } else // n is even, n=2m: { int m=n/2; - ZPoly t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m-1); - t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m+2)*t1*t1; - ZPoly t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m+1); - t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m-2)*t2*t2; - return div_pol_odd_rec(a1,a2,a3,a4,a6,m)*(t1-t2); + ZPoly t1=div_pol_odd(a1,a2,a3,a4,a6,m-1); + t1=div_pol_odd(a1,a2,a3,a4,a6,m+2)*t1*t1; + ZPoly t2=div_pol_odd(a1,a2,a3,a4,a6,m+1); + t2=div_pol_odd(a1,a2,a3,a4,a6,m-2)*t2*t2; + return div_pol_odd(a1,a2,a3,a4,a6,m)*(t1-t2); } } } +ZPoly div_pol(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6,int n) +{ + return (n==2? div_pol_2(a1,a2,a3,a4,a6) : div_pol_odd(a1,a2,a3,a4,a6,n)); +} + +ZPoly division_polynomial(Curvedata* E, int p) +{ + bigint a1,a2,a3,a4,a6; + E->getai(a1,a2,a3,a4,a6); + return (p==2? div_pol_2(a1,a2,a3,a4,a6) : div_pol_odd(a1,a2,a3,a4,a6,p)); +} + +// Numerator of the multiplication-by-n map on the x-coordinate + +ZPoly mul_by_n_num(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, int n) +{ + ZPoly X; ZPolySetX(X); + ZPoly P_2 = div_pol_2(a1,a2,a3,a4,a6); + ZPoly P_n = div_pol_odd(a1,a2,a3,a4,a6,n); + ZPoly P_nplus1 = div_pol_odd(a1,a2,a3,a4,a6,n+1); + ZPoly P_nminus1 = div_pol_odd(a1,a2,a3,a4,a6,n-1); + ZPoly A = X * P_n * P_n; + ZPoly B = P_nminus1 * P_nplus1; + return (n%2==0? A * P_2 - B : A - P_2 * B); +} + +// Denominator of the multiplication-by-n map on the x-coordinate + +ZPoly mul_by_n_den(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, int n) +{ + ZPoly P_n = div_pol_odd(a1,a2,a3,a4,a6,n); + return (n%2==1? P_n * P_n : P_n * P_n * div_pol_2(a1,a2,a3,a4,a6)); +} + +// Polynomial whose roots are x(Q) for Q satisfying n*Q=P, where x(P)=xP/zP + +ZPoly division_points_X_pol(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, + int n, + const bigint& xP, const bigint& zP) +{ + ZPoly numpoly = mul_by_n_num(a1, a2, a3, a4, a6, n); + ZPoly denpoly = mul_by_n_den(a1, a2, a3, a4, a6, n); + //cout << "numpoly = " << numpoly << endl; + //cout << "denpoly = " << numpoly << endl; + return zP * numpoly - xP * denpoly; +} + diff -Nru eclib-20190909/libsrc/eclib/compproc.h eclib-20210625/libsrc/eclib/compproc.h --- eclib-20190909/libsrc/eclib/compproc.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/compproc.h 2021-06-25 09:53:34.000000000 +0000 @@ -41,7 +41,6 @@ vector solvequartic(const bigcomplex& a, const bigcomplex& b, const bigcomplex& c, const bigcomplex& d); vector solverealquartic(const bigfloat& a, const bigfloat& b, const bigfloat& c, const bigfloat& d, const bigfloat& e); -vector introotscubic(long a, long b, long c, int& nr); void quadsolve(const bigfloat& p, const bigfloat& q, bigcomplex& root1,bigcomplex& root2); #endif diff -Nru eclib-20190909/libsrc/eclib/curve.h eclib-20210625/libsrc/eclib/curve.h --- eclib-20190909/libsrc/eclib/curve.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/curve.h 2021-06-25 09:53:34.000000000 +0000 @@ -114,14 +114,14 @@ public: Curvedata() {discr_factored=0;} Curvedata(const bigint& aa1, const bigint& aa2, const bigint& aa3, - const bigint& aa4, const bigint& aa6, int min_on_init = 0); + const bigint& aa4, const bigint& aa6, int min_on_init); /* Curvedata(const bigrational& qa1, const bigrational& qa2, const bigrational& qa3, const bigrational& qa4, const bigrational& qa6, bigint& scale); */ Curvedata(const vector& qai, bigint& scale); - Curvedata(const Curve& c, int min_on_init = 0); + Curvedata(const Curve& c, int min_on_init); Curvedata(const bigint& cc4, const bigint& cc6, int min_on_init); Curvedata(const Curvedata& c); Curvedata(const Curvedata& c, int min_on_init); @@ -157,6 +157,9 @@ if(!c.discr_factored) c.factor_discr(); return c.the_bad_primes; } + // NB the is_minimal function returns 0 when minimization has not + // been done; the curve may still be minimal + friend int is_minimal(const Curvedata& c) {return c.minimal_flag;} protected: bigint b2 ; bigint b4 ; @@ -286,13 +289,29 @@ friend int getord_p_N(const CurveRed& c, const bigint& p); friend int getord_p_j_denom(const CurveRed& c, const bigint& p); friend int getc_p(const CurveRed& c, const bigint& p); - friend int prodcp(const CurveRed& c); + friend bigint prodcp(const CurveRed& c); friend int LocalRootNumber(CurveRed& c, const bigint& p); friend int GlobalRootNumber(CurveRed& c); friend Kodaira_code getKodaira_code(const CurveRed& c, const bigint& p); // the returned value casts as a character array; to use coded as int, // say declared Kodaira_code Kc, just use public member Kc.code friend bigint Trace_Frob(CurveRed& c, const bigint& p); + + // The local Tamagawa number. Use p=0 for reals + friend bigint local_Tamagawa_number(CurveRed& c, const bigint& p); + // The global Tamagawa number, = product of local ones. + friend bigint global_Tamagawa_number(CurveRed& c, int real_too); + + // The local Tamagawa exponent -- same as Tamagawa number unless the + // component group is (2,2). Use p=0 for reals + friend bigint local_Tamagawa_exponent(CurveRed& c, const bigint& p); + + // The global Tamagawa exponent, i.e. the lcm of the exponents of + // the component groups at all bad primes (including infinity if + // real_too is 1), which is the lcm of the local Tamagawa exponents. + // So (with no further knowledge of the MW group) we know that m*P + // is in the good-reduction subgroup for all P, with this m. + friend bigint global_Tamagawa_exponent(CurveRed& c, int real_too); }; diff -Nru eclib-20190909/libsrc/eclib/descent.h eclib-20210625/libsrc/eclib/descent.h --- eclib-20190909/libsrc/eclib/descent.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/descent.h 2021-06-25 09:53:34.000000000 +0000 @@ -135,7 +135,8 @@ vector getbasis(); // returns points on original model vector getpbasis(); // returns points on integral model void report_rank() const; - void saturate(long sat_bd); // =0 for none + // sat_bd=0 for none; assume saturated at p<=sat_low_bd + void saturate(long sat_bd, long sat_low_bd=2); void show_gens(); // display points on original model void show_result_status(); void pari_output(); diff -Nru eclib-20190909/libsrc/eclib/divpol.h eclib-20210625/libsrc/eclib/divpol.h --- eclib-20190909/libsrc/eclib/divpol.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/divpol.h 2021-06-25 09:53:34.000000000 +0000 @@ -36,10 +36,34 @@ // The poly itself is found recursively -vector div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, - const bigint& a6,int n); +// Despite the name, for even n this returns a correct n-division +// polynomial without the 2-torsion factor, i.e. the polynomial whoe +// roots are the x-coordinates of the points P satisfying nP=0, 2P!=0. +ZPoly div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6,int n); -vector makepdivpol(Curvedata* EE, int p); +ZPoly div_pol_2(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6); + +ZPoly div_pol(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6,int n); + +ZPoly division_polynomial(Curvedata* EE, int p); + +// Numerator and denominator of the multiplication-by-n map on the x-coordinate + +ZPoly mul_by_n_num(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, int n); + +ZPoly mul_by_n_den(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, int n); + +// Polynomial whose roots are x(Q) for Q satisfying n*Q=P, where x(P)=xP/zP + +ZPoly division_points_X_pol(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, + const bigint& a6, + int n, + const bigint& xP, const bigint& zP); #endif // #define _DIVPOL_ diff -Nru eclib-20190909/libsrc/eclib/egr.h eclib-20210625/libsrc/eclib/egr.h --- eclib-20190909/libsrc/eclib/egr.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/egr.h 2021-06-25 09:53:34.000000000 +0000 @@ -29,28 +29,33 @@ // class to handle component groups at primes of bad reduction etc +// NB all of the internal methods assume that the curve is a global +// minimal model. The normal use of the class will be via the +// function egr_index() which handles computation of a minimal model +// and transferring the points to the minimal model where necessary, + class ComponentGroups : public CurveRed { public: ComponentGroups(const Curvedata& CD) : CurveRed(CD) {;} ComponentGroups(const CurveRed& CR) : CurveRed(CR) {;} - ComponentGroups(const Curve& C) : CurveRed(C) {;} + // ComponentGroups(const Curve& C) : CurveRed(C) {;} ComponentGroups() : CurveRed() {;} // return 1 iff P mod p is nonsingular: - int HasGoodReduction(const Point& P, const bigint& p); + int HasGoodReduction(const Point& P, const bigint& p) const; // return 1 iff P mod p is nonsingular for all p in plist; else return // 0 and put the first prime of bad reduction into p0: - int HasGoodReduction(const Point& P, const vector& plist, bigint& p0); + int HasGoodReduction(const Point& P, const vector& plist, bigint& p0) const; // return 1 iff P mod p is nonsingular for all p (including infinity); // else return 0 and put the first prime of bad reduction into p0: - int HasGoodReduction(const Point& P, bigint& p0); + int HasGoodReduction(const Point& P, bigint& p0) const; // Returns [m] for cyclic of order m, [2,2] for 2*2 (type I*m, m even) - vector ComponentGroup(const bigint& p); + vector ComponentGroup(const bigint& p) const; // Returns 1 iff P and Q have same image in the component group at p: - int InSameComponent(const Point& P, const Point& Q, const bigint& p); + int InSameComponent(const Point& P, const Point& Q, const bigint& p) const; // For reduction type Im, multiplicative reduction where component // group is cyclic of order m, returns a such that P mod p maps to a @@ -61,9 +66,9 @@ // N.B.2 The case of noncyclic component group is not handled here. - long ImageInComponentGroup(const Point&P, const bigint& p, vector grp); - long ImageInComponentGroup_Im(const Point&P, const bigint& p, int m); - long ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m); + long ImageInComponentGroup(const Point&P, const bigint& p, vector grp) const; + long ImageInComponentGroup_Im(const Point&P, const bigint& p, int m) const; + long ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m) const; // Return least j>0 such that j*P has good reduction at p, i.e. the // order of the image of P in the component group at p; the component @@ -89,13 +94,6 @@ // subgroup of the original with good reduction at all p, // returning the overall index int egr_subgroup(vector& Plist, int real_too=1); - -// returns m = the lcm of the exponents of the component groups at all -// bad primes (including infinity if real_too is 1), which is the lcm -// of the Tamagawa numbers (except: 2 when component group is of type -// 2,2). So with no further knowledge of the MW group we know that -// m*P is in the good-reduction subgroup for all P - bigint Tamagawa_exponent(int real_too=1); }; // returns the index in the subgroup generated by the given points of @@ -113,16 +111,6 @@ // least one P_i is not in the connected component) // -vector > MapPointsToComponentGroup(const CurveRed& CR, const vector& Plist, const bigint& p); - -// returns m = the lcm of the exponents of the component groups at all -// bad primes (including infinity if real_too is 1), which is the lcm -// of the Tamagawa numbers (except: 2 when component group is of type -// 2,2). So with no further knowledge of the MW group we know that -// m*P is in the good-reduction subgroup for all P -inline bigint Tamagawa_exponent(const CurveRed& CR, int real_too=1) -{ - return ComponentGroups(CR).Tamagawa_exponent(real_too); -} +vector > MapPointsToComponentGroup(const ComponentGroups& CG, const vector& Plist, const bigint& p); #endif diff -Nru eclib-20190909/libsrc/eclib/elog.h eclib-20210625/libsrc/eclib/elog.h --- eclib-20190909/libsrc/eclib/elog.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/elog.h 2021-06-25 09:53:34.000000000 +0000 @@ -91,9 +91,15 @@ // First version will compute the Cperiods itself, so best to use the // second one if more than one call is to be made for the same curve +// +// Set only_one=1 if at most one solution required (but more may be returned) -vector division_points(Curvedata& E, const Point& P, int m); -vector division_points(Curvedata& E, Cperiods& per, const Point& P, int m); +vector division_points(Curvedata& E, const Point& P, int m, int only_one=0); +vector division_points(Curvedata& E, Cperiods& per, const Point& P, int m, int only_one=0); + +// Set Q to a solution of m*Q=P and return 1 if a solution exists, else return 0 + +int divide_point(Curvedata& E, const Point& P, int m, Point& Q); // Returns a vector of solutions to m*Q=0 (including Q=0) diff -Nru eclib-20190909/libsrc/eclib/htconst.h eclib-20210625/libsrc/eclib/htconst.h --- eclib-20190909/libsrc/eclib/htconst.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/htconst.h 2021-06-25 09:53:34.000000000 +0000 @@ -41,11 +41,14 @@ bigfloat lower_height_bound_alt(const Curvedata& CD); bigfloat lower_height_bound_search(const Curvedata& CD, const bigfloat& reg); +bigfloat Gamma_n(long n); // Gamma(n) = (n-1)! +bigfloat Gamma_n_plus_half(long n); // Gamma(n+1/2) = (2n)!sqrt(pi) / (4^n*n!) + bigfloat lattice_const(int r); -// returns lower bound for height of non-torsion points of good -// reduction, following Cremona & Siksek in ANTS7 -bigfloat egr_lower_height_bound(const Curvedata& CD); +// returns lower bound for height of non-torsion points, following +// Cremona & Siksek in ANTS7 +bigfloat lower_height_bound(const Curvedata& CD, int egr); // Class to find point of minimal height by searching. @@ -132,20 +135,19 @@ vector intersect(const vector& L1, const vector& L2); -vector annihilators(const Curvedata& CD, long n); - // Class to compute lower bound for height of non-torsion points of good // reduction, following Cremona & Siksek in ANTS7 -class CurveHeightConst : public Curvedata, Cperiods { +class CurveHeightConst : public CurveRed, Cperiods { bigfloat c; // archimidean constribution bigfloat e3; // largest (or only) real root bigfloat lower, upper; - int n_max; - int n_ann; - vector ann; // indices of E0/E1 for first few primes - bigfloat D(const long n) const; // "denomContrib" - bigfloat Bnmu(const long n, const bigfloat& mu) const // = B_n(mu) + int n_max; + long e_p(long p); // fetch /compute exponent at p + map ann; // stored exponents of E0/E1 for first few primes + bigfloat D(long n); // fetch /compute denomContrib at n + map DE; // stored D_E(n) values + bigfloat Bnmu(long n, const bigfloat& mu) // = B_n(mu) { return exp(n*n*mu+c-D(n)); } int test_target(const bigfloat& target, long k); vector canonicalHeightInterval(const bigfloat& target, long k); @@ -165,7 +167,7 @@ bigcomplex pointtoz(const bigfloat& x, const bigfloat& y) {return ellpointtoz(*this,*this,x,y);} public: - CurveHeightConst(const Curvedata& CD); + CurveHeightConst(CurveRed& CR); void compute() {compute_phase1(); compute_phase2(); } bigfloat get_value() const {return lower;} }; diff -Nru eclib-20190909/libsrc/eclib/interface.h eclib-20210625/libsrc/eclib/interface.h --- eclib-20190909/libsrc/eclib/interface.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/interface.h 2021-06-25 09:53:34.000000000 +0000 @@ -23,7 +23,7 @@ // The macro NO_MPFP can optionally be set. It controls whether most // real and complex floating point functions are implemented using -// doubles and complex doubles (if set) ot using NTL bigfloats +// doubles and complex doubles (if set) or using NTL bigfloats // (RR) and bigcomplexes (CC) (if not set, the default) #ifndef _ECLIB_INTERFACE_H_ @@ -64,6 +64,8 @@ #define MAXLONG numeric_limits::max() #endif +const double LOG_10_2=0.30102999566398114L; + // integers and rationals // Some of the following were defined for compatibility with LiDIA, which is no longer supported @@ -238,9 +240,9 @@ // (default 10). See www.shoup.net/ntl/doc/tour-ex6.html and // www.shoup.net/ntl/doc/RR.cpp.html. -// Set internal precision to n bits and output precision to (0.3*n)-1 decimal places +// Set internal precision to n bits and output precision to (log_10(2)*n)-1 decimal places inline void set_precision(long n) -{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);} +{RR::SetPrecision(n); RR::SetOutputPrecision(long(LOG_10_2*n)-1);} // Mostly for backward compatibility (used in saturate.cc) or for // temporarily changing internal precision when no output is relevant: @@ -252,7 +254,7 @@ {long n; cerr<>n; set_precision(n);} // read current precision converted to decimal (approximately) -inline long decimal_precision() {return long(RR::precision()*0.3);} +inline long decimal_precision() {return long(RR::precision()*LOG_10_2);} // read current bit precision inline long bit_precision() {return RR::precision();} @@ -289,10 +291,10 @@ inline int is_approx_zero(double x) {return fabs(x)<1e-10;} // We cannot set internal bit precision in this mode, so we just set the output decimal precision -inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));} +inline void set_precision(long n) {cout.precision(min(15,long(LOG_10_2*n)));} inline void set_precision(const string prompt) {cout.precision(15);} -#define Pi() 3.1415926535897932384626433832795028841 -#define Euler() (0.57721566490153286060651209008240243104) +#define Pi() (double)(3.1415926535897932384626433832795028841) +#define Euler() (double)(0.57721566490153286060651209008240243104) inline double round(double x) {return floor(x+0.5);} inline double roundup(double x) {return ceil(x-0.5);} @@ -300,7 +302,10 @@ // return value is 1 for success, else 0 int longify(double x, long& a, int rounding=0); inline int doublify(const bigfloat& x, double& d) {d=x; return 0;} - +inline double inv(double x) {return 1/x;} +inline double sqr(double x) {return x*x;} +inline double power2_RR(long e) {return 1< Introotscubic(const bigint& a, const bigint& b, const bigint& c); -vector Introotsquartic(const bigint& a, const bigint& b, const bigint& c, - const bigint& d); - // find the number of roots of X^3 + bX^2 + cX + d = 0 (mod p) // roots are put in r which should be allocated of size 3 int nrootscubic(long b, long c, long d, long p, long* roots); diff -Nru eclib-20190909/libsrc/eclib/mat.h eclib-20210625/libsrc/eclib/mat.h --- eclib-20190909/libsrc/eclib/mat.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/mat.h 2021-06-25 09:53:34.000000000 +0000 @@ -110,6 +110,10 @@ long& rk, long& ny, scalar pr); friend mat ref_via_flint(const mat& M, vec& pcols, vec& npcols, long& rk, long& ny, scalar pr); + friend mat ref_via_ntl(const mat& M, vec& pcols, vec& npcols, + long& rk, long& ny, scalar pr); + friend long rank_via_ntl(const mat& M, scalar pr); + friend long det_via_ntl(const mat& M, scalar pr); friend subspace combine(const subspace& s1, const subspace& s2); friend mat restrict_mat(const mat& m, const subspace& s, int cr); friend int liftmat(const mat& mm, scalar pr, mat& m, scalar& dd, int trace); @@ -144,3 +148,10 @@ long& rk, long& ny, scalar& d, int method=0); // default method 0: scalars mat addscalar(const mat&, scalar); vec apply(const mat&, const vec&); + +// Construct an NTL mat_lzz_p (matrix mod p) from a mat mod pr +mat_zz_p mat_zz_p_from_mat(const mat& M, scalar pr); + +// Construct a mat (scalar type same as pr) from an NTL mat_lzz_p + +mat mat_from_mat_zz_p(const mat_zz_p& A, scalar pr); // type of scalar fixes return type diff -Nru eclib-20190909/libsrc/eclib/mwprocs.h eclib-20210625/libsrc/eclib/mwprocs.h --- eclib-20190909/libsrc/eclib/mwprocs.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/mwprocs.h 2021-06-25 09:53:34.000000000 +0000 @@ -59,7 +59,7 @@ int process(const Point& P, int sat=MAXSATPRIME); int process(const vector& Plist, int sat=MAXSATPRIME); // saturate the current basis: - int saturate(bigint& index, vector& unsat, long sat_bd=-1, int odd_primes_only=0); + int saturate(long& index, vector& unsat, long sat_bd=-1, long sat_low_bd=0); void search(bigfloat h_lim, int moduli_option=0, int verb=0); void search_range(bigfloat xmin, bigfloat xmax, bigfloat h_lim, int moduli_option=2, int verb=0); diff -Nru eclib-20190909/libsrc/eclib/newforms.h eclib-20210625/libsrc/eclib/newforms.h --- eclib-20190909/libsrc/eclib/newforms.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/newforms.h 2021-06-25 09:53:34.000000000 +0000 @@ -198,8 +198,8 @@ void find_jlist(); // Create from one or a list of elliptic curves of the right conductor: - void createfromcurve(int s, const CurveRed& C, int nap=25); - void createfromcurves(int s, vector Clist, int nap=25); + void createfromcurve(int s, const CurveRed& C, int nap=500); + void createfromcurves(int s, vector Clist, int nap=500); // Lazy version which does not get the homology eigenvectors, only // sets the aq & ap (for use as oldforms): void createfromcurves_mini(vector Clist, int nap=25); diff -Nru eclib-20190909/libsrc/eclib/options.h eclib-20210625/libsrc/eclib/options.h --- eclib-20190909/libsrc/eclib/options.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/options.h 2021-06-25 09:53:34.000000000 +0000 @@ -26,6 +26,7 @@ //flags that this file has been included #include +#include #include @@ -87,6 +88,7 @@ while ((option_char = getopt ()) != EOF) switch (option_char) { + case 'V': cout << eclib_version() < #define PI Pi() -//#ifndef TWOPI -//#define TWOPI ((2*PI)) -//#endif -//#ifndef LOG10 -#define LOG10 log(10) -//#endif const bigfloat eps = to_bigfloat(1.0e-16); // ?? mindouble; #define EULERGAMMA Euler() diff -Nru eclib-20190909/libsrc/eclib/points.h eclib-20210625/libsrc/eclib/points.h --- eclib-20190909/libsrc/eclib/points.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/points.h 2021-06-25 09:53:34.000000000 +0000 @@ -27,8 +27,9 @@ #ifndef _ECLIB_POINTS_ #define _ECLIB_POINTS_ +#include #include -#include +#include // // class for points on elliptic curves @@ -77,7 +78,7 @@ : P2Point(Q), E(Q.E), ord(Q.ord), height(Q.height) { ; } ~Point(void) {;} - + // input and output are inherited from P2Point class but the input // function must initialize the ord and height fields too friend istream& operator>>(istream & is, Point& P) @@ -127,7 +128,7 @@ Point operator-(void) const ; // -P Point twice(void) const ; // doubles P friend Point operator*(int, const Point&) ; // n*P - + // access functions Curve getcurve() const {return *E;} friend int order(Point& p); // calculate and set if not set @@ -137,9 +138,12 @@ friend bigfloat realheight(const Point& P); friend bigfloat pheight(const Point& P, const bigint& p); + vector division_points(int m); // list of Q s.t. n*Q=this + // useful logical tests int is_zero() const { return isinfinite(); } int isvalid() const ; // P on its curve ? + int is_torsion() { return order(*this)>0; } // will compute and set the order if needed }; // end of point class diff -Nru eclib-20190909/libsrc/eclib/pointsmod.h eclib-20210625/libsrc/eclib/pointsmod.h --- eclib-20190909/libsrc/eclib/pointsmod.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/pointsmod.h 2021-06-25 09:53:34.000000000 +0000 @@ -187,12 +187,13 @@ // ~curvemodqbasis(void) {;} bigint get_order() {return n;} + bigint get_exponent() {return n1;} pointmodq get_gen(int i); vector get_pbasis(int p); vector get_pbasis_from_roots(int p, const vector& xi); vector get_pbasis_via_divpol(int p); - vector get_pbasis_via_divpol(int p, const vector& pdivpol); + vector get_pbasis_via_divpol(int p, const ZPoly& pdivpol); friend class TLSS; }; diff -Nru eclib-20190909/libsrc/eclib/polys.h eclib-20210625/libsrc/eclib/polys.h --- eclib-20190909/libsrc/eclib/polys.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/polys.h 2021-06-25 09:53:34.000000000 +0000 @@ -54,6 +54,14 @@ vector rootsmod(const vector& coeffs, bigint p); vector roots(const FqPoly& f); vector roots(const vector& coeffs); +vector roots(const ZPoly& f); +vector introots(const ZPoly& f); + +vector Introotscubic(const bigint& a, const bigint& b, const bigint& c); +vector Introotsquartic(const bigint& a, const bigint& b, const bigint& c, + const bigint& d); + + // find the number of roots of X^3 + bX^2 + cX + d = 0 (mod p) int nrootscubic(const bigint& bb, const bigint& cc, const bigint& dd, const bigint& p); diff -Nru eclib-20190909/libsrc/eclib/saturate.h eclib-20210625/libsrc/eclib/saturate.h --- eclib-20190909/libsrc/eclib/saturate.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/saturate.h 2021-06-25 09:53:34.000000000 +0000 @@ -40,6 +40,24 @@ // unless overridden by the sat_bd parameter: const long SAT_MAX_PRIME = 100000; + +// Bound for the index of saturation for the given set of points If +// egr is set it determines the egr subgroup of the group the points +// generate and only searches for points with egr, This might be +// faster in some cases. + +// The points parameter is not const, since the heights of the points +// may be computed and set. + +// We can recover the curve from the points, unless the list is empty +// in which case the bound is 1. + +bigint index_bound(vector& points, int egr=1, int verbose=0); + +// Tamagawa primes: primes dividing any Tamagawa number +vector tamagawa_primes(const Curvedata& C); + + class saturator { private: Curvedata *E; // the curve @@ -47,17 +65,22 @@ vector Plistp; // the p-cotorsion vector Plistx; // the points plus p-cotorsion vector AllTorsion; // all torsion on E - vector pdivpol; // coefficients of p-division poly (not always used) + ZPoly pdivpol; // p-division poly (not always used) + bigint the_index_bound; // set initially, but may get reduced + vector tam_primes; // primes dividing any Tamagawa index int rank; // = #Plistx bigint disc; // discriminant of E int p; // current prime to saturate at int log_index; // current points have index p^log_index in original primevar qvar; // loops over possible sieving primes q - vector Eqlist; // E mod q for q=3,5,... (good reduction) - vector::iterator Eqptr; - int newq; // =1 iff we are using q not yet cahced + map Emodq; + map Emodq_order; + int newq; // =1 iff we are using q not yet cached + map q_tally; // key=q, value = count of number of times q used + bigint maxq; // largest q used + int maxp; // p for which largest q used - mat_l TLimage; + mat_l TLimage; int TLrank, stuck_counter, verbose, use_div_pols; // apply TL map (mod current q) to P, result in (ntp*)[0..p-1]: @@ -73,33 +96,59 @@ use_div_pols=0; disc = getdiscr(*E); AllTorsion = torsion_points(*EE); + tam_primes = tamagawa_primes(*E); + maxq = 0; + the_index_bound = BIGINT(0); // means not set } ~saturator() {; } - + // initialize point list - void set_points(const vector& PP) {Plist = PP;} + void set_points(const vector& PP) { + Plist = PP; + the_index_bound = BIGINT(0); + } + + // initialize index bound + void set_index_bound(int egr=1); + + // return current index bound (compute if necessary) + bigint get_index_bound(int egr=1); + + // test whether p is greater than the saturation index and not a Tamagawa prime + int trivially_saturated(long p); + // find next usable q and use it void nextq(); - // keep on using q until saturated or stuck: + + // test p-saturation by using q until saturated (return 1) or stuck + // (return 0): int test_saturation(int pp, int ms=MAX_REPEAT); + // try harder with same p (no initialization, but same point set) int test_saturation_extra(int pp, int ms=MAX_REPEAT); + // enlarge basis if dim(kernel)>0: int enlarge(); - // repeat testing saturation and enlarging until done: - // returns log_p of index + + // repeat testing p-saturation and enlarging until done: returns + // log_p of index, or -1 if failed int do_saturation(int pp, int maxntries=10); - // As above but for all primes up to p, returns index - int do_saturation_upto(int maxp, int maxntries=10); + // As above but for all primes in plist, returns success flag, sets - // index and unsat = list of primes in plist at which - // saturation failed - int do_saturation(vector plist, - bigint& index, vector& unsat, int maxntries=10); - int do_saturation(vector plist, - bigint& index, vector& unsat, int maxntries=10); - // auto-saturate, after finding an upper bound on saturation index - int saturate(vector& unsat, bigint& index, long sat_bd=-1, int egr=1, int maxntries=10, int odd_primes_only=0); + // index and unsat = list of primes in plist at which saturation + // failed = empty iff success flag=0 + int do_saturation(vector plist, + long& index, vector& unsat, int maxntries=10); + int do_saturation(vector plist, + long& index, vector& unsat, int maxntries=10); + + // Either (when sat_bd=-1) auto-saturate, finding an upper bound ib + // on saturation index, or (when sat_bd>0) saturate only for primes + // up to min(ib,sat_bd). If sat_low_bd>0 then we do no p-saturation + // for p& unsat, long& index, + long sat_bd=-1, long sat_low_bd=2, + int egr=1, int maxntries=10); // replace the generating points & reset matrices and ranks // (then can use test_saturation_extra()) @@ -120,8 +169,9 @@ long stuckfor() const {return stuck_counter;}; // get a nonzero kernel vector (if any) vec_l kernel_vector(); - // test if saturated: + // test if saturated: int is_saturated() {return rank==TLrank;} + void show_q_tally(); // display list of q used with multiplicity. }; // auxiliary functions, not part of the saturator class: @@ -139,21 +189,12 @@ // Returns success flag and index, and (if success==0) a list of // primes at which saturation failed. The array points will be // changed (if necessary) into a basis for the saturation. -// If sat_bd>-1 it is used to truncate the upper bound +// If sat_bd>-1 it is used to truncate the upper bound. +// No p-saturation is done for p& points, - bigint& index, vector& unsat, - long sat_bd=-1, int egr=1, int verbose=0); - - -// Bound for the index of saturation for the given set of points If -// egr is set it determines the egr subgroup of the group the points -// generate and only searches for points with egr, This might be faster -// in some cases... -bigint index_bound(Curvedata* C, vector& points, - int egr=1, int verbose=0); - -// Tamagawa primes: primes dividing any Tamagawa number -vector tamagawa_primes(const Curvedata& C); +int saturate_points(Curvedata& C, vector& points, + long& index, vector& unsat, + long sat_bd=-1, long sat_low_bd=2, + int egr=1, int verbose=0); #endif diff -Nru eclib-20190909/libsrc/eclib/smat_elim.h eclib-20210625/libsrc/eclib/smat_elim.h --- eclib-20190909/libsrc/eclib/smat_elim.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/smat_elim.h 2021-06-25 09:53:34.000000000 +0000 @@ -98,6 +98,8 @@ void standard( ); void back_sub( ); void sparse_elimination( ); + smat old_kernel( vec&, vec& ); + smat new_kernel( vec&, vec& ); smat kernel( vec&, vec& ); void normalize( int, int ); void eliminate( int&, int& ); diff -Nru eclib-20190909/libsrc/eclib/smat.h eclib-20210625/libsrc/eclib/smat.h --- eclib-20190909/libsrc/eclib/smat.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/smat.h 2021-06-25 09:53:34.000000000 +0000 @@ -39,7 +39,7 @@ int nco; // number of columns int nro; // number of rows int **col; // holds cols of entries - scalar **val; // holds values of entries + scalar **val; // holds values of entries public: // constructors @@ -48,7 +48,7 @@ smat (const smat&); // copy constructor smat (const mat &); // conversion constructor ~smat(); // destructor - + // member functions & operators mat as_mat( ) const; @@ -69,6 +69,7 @@ void set_row ( int, int, int*, scalar* ); smat select_rows(const vec& rows) const; void setrow ( int i, const svec& v); // i counts from 1 + void setrow ( int i, const vec& v); // i counts from 1 svec row(int) const; // extract row i as an svec int nrows() const {return nro;} int ncols() const {return nco;} diff -Nru eclib-20190909/libsrc/eclib/templates.h eclib-20210625/libsrc/eclib/templates.h --- eclib-20190909/libsrc/eclib/templates.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/templates.h 2021-06-25 09:53:34.000000000 +0000 @@ -65,7 +65,6 @@ using std::pair; using std::sort; using std::abs; -using std::binary_function; using std::setw; @@ -73,7 +72,7 @@ inline ostream& operator<<(ostream& os, const vector& v) { os <<"[ "; - copy(v.begin(),v.end(), ostream_iterator(cout, " ")); + copy(v.begin(),v.end(), ostream_iterator(os, " ")); os << "]"; return os; } @@ -84,7 +83,7 @@ unsigned int m=v.size(); bool trunc=0; if((n>0)&&(m>n)) {m=n; trunc=1;} os <<"[ "; - copy(v.begin(),v.begin()+m, ostream_iterator(cout, " ")); + copy(v.begin(),v.begin()+m, ostream_iterator(os, " ")); if(trunc) os << "..."; os << "]"; } @@ -93,7 +92,7 @@ inline ostream& operator<<(ostream& os, const std::set& v) { os <<"{ "; - copy(v.begin(),v.end(), ostream_iterator(cout, " ")); + copy(v.begin(),v.end(), ostream_iterator(os, " ")); os << "}"; return os; } @@ -103,10 +102,8 @@ template vector vector_union(const vector& a, const vector& b) { - // cout<<"merging "< c; set_union(a.begin(),a.end(),b.begin(),b.end(),inserter(c,c.end())); - // cout<<"result is "<& pdivpol, int verb=0); + void init(int pp, const ZPoly& pdivpol, int verb=0); ~TLSS() {; } // apply map to P, result in (ntp*)[0..p-1]: diff -Nru eclib-20190909/libsrc/eclib/version.h eclib-20210625/libsrc/eclib/version.h --- eclib-20190909/libsrc/eclib/version.h 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/eclib/version.h 2021-06-25 09:53:34.000000000 +0000 @@ -1,4 +1,4 @@ -// version.h: declaration of function show_version() +// version.h: declaration of functions show_version(), eclib_version() ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona @@ -25,6 +25,25 @@ #if !defined(_ECLIB_VERSION_H) #define _ECLIB_VERSION_H 1 //flags that this file has been included -void show_version(); +#include +#include + +// Return the current eclib version as a string, e.g. 'v20210317' + +string eclib_version(); + +// Return the current eclib version as a triple [y,m,d], e.g. string, e.g. [2021,3,17] + +vector eclib_date(); + +// Display the current eclib version and compilation information + +void show_version(ostream& os = cout); + +// compare current eclib version date with a triple (y,m,d), returning +// +1 if the current version is later (more recent) than (y,m,d), 0 if +// equal and -1 if earlier (older). + +int compare_eclib_version(int y, int m, int d); #endif diff -Nru eclib-20190909/libsrc/egr.cc eclib-20210625/libsrc/egr.cc --- eclib-20190909/libsrc/egr.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/egr.cc 2021-06-25 09:53:34.000000000 +0000 @@ -32,7 +32,7 @@ // return 1 if P mod p is nonsingular: -int ComponentGroups::HasGoodReduction(const Point& P, const bigint& p) +int ComponentGroups::HasGoodReduction(const Point& P, const bigint& p) const { #ifdef DEBUG_EGR cout<<"Testing whether point " @@ -47,8 +47,10 @@ #endif return 1; } + bigint X=P.getX(); bigint Y=P.getY(); + if(is_zero(p)) // test whether P is not on the "egg" { if(conncomp==1) @@ -58,19 +60,23 @@ #endif return 1; } + bigint fd = 6*X*X+b2*X*Z+b4*Z*Z; - if(sign(fd)<0) + + if(sign(fd)<0) { #ifdef DEBUG_EGR - cout<<"no (real f' condition)"<0 { #ifdef DEBUG_EGR - cout<<"no (real f\" condition)"<& plist, bigint& p0) +int ComponentGroups::HasGoodReduction(const Point& P, const vector& plist, bigint& p0) const { for(unsigned int i=0; i ComponentGroups::ComponentGroup(const bigint& p) +vector ComponentGroups::ComponentGroup(const bigint& p) const { vector ans(1); if(p==0) ans[0]=conncomp; // 1 or 2 @@ -153,7 +159,7 @@ // Returns 1 iff P and Q have same image in the component group at p: // -int ComponentGroups::InSameComponent(const Point& P, const Point& Q, const bigint& p) +int ComponentGroups::InSameComponent(const Point& P, const Point& Q, const bigint& p) const { if(P==Q) return 1; return HasGoodReduction(P-Q,p); @@ -164,7 +170,7 @@ // Returns a such that P mod pr maps to +a or -a mod m in the // component group -long ComponentGroups::ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m) +long ComponentGroups::ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m) const { #ifdef DEBUG_EGR cout<<"In ImageInComponentGroup_Im_pm() with point " @@ -189,7 +195,7 @@ // group is cyclic of order m, using full Tate curve formula. // Returns a such that P mod pr maps to a mod m in the component group -long ComponentGroups::ImageInComponentGroup_Im(const Point&P, const bigint& p, int m) +long ComponentGroups::ImageInComponentGroup_Im(const Point&P, const bigint& p, int m) const { #ifdef DEBUG_EGR cout<<"In ImageInComponentGroup_Im() with point " @@ -269,7 +275,7 @@ return ans; } -long ComponentGroups::ImageInComponentGroup(const Point&P, const bigint& p, vector grp) +long ComponentGroups::ImageInComponentGroup(const Point&P, const bigint& p, vector grp) const { int ans=0; // the default #ifdef DEBUG_EGR @@ -601,21 +607,62 @@ bigint egr_index(const vector& Plist, int real_too) { if(Plist.size()==0) return BIGINT(1); - ComponentGroups CGS(Plist[0].getcurve()); + + // Compute minimal model and map points to it if necessary + + Curvedata E_orig = Curvedata(Plist[0].getcurve(), 0); + int is_min = 0;//is_minimal(E_orig); + bigint u, r, s, t; + Curvedata Emin; + +#ifdef DEBUG_EGR + cout<<"In egr_index("<<(Curve)E_orig<<")"< Plist_min; + if (is_min) + { + Plist_min = Plist; + } + else + { + for (vector::const_iterator Pi = Plist.begin(); Pi!=Plist.end(); Pi++) + Plist_min.push_back(transform(*Pi, &Emin, u, r, s, t)); + } + + // Construct the ComponentGroups class from the minimal model + + ComponentGroups CGS(Emin); vector plist = getbad_primes(CGS); if(real_too && (getconncomp(CGS)==2)) plist.push_back(BIGINT(0)); #ifdef DEBUG_EGR cout<<"Using primes "< > > imagematrix; - vector moduli; + vector moduli; int n=0; + + // Loop through bad primes (possibly including infinity), computing + // the image in the local component group + for(vector::const_iterator pi=plist.begin(); pi!=plist.end(); pi++) { #ifdef DEBUG_EGR cout<<"p = "<<(*pi)< > im=MapPointsToComponentGroup(CGS,Plist,*pi); + vector > im=MapPointsToComponentGroup(CGS,Plist_min,*pi); #ifdef DEBUG_EGR cout<<"image = "; for(unsigned int j=0; j > MapPointsToComponentGroup(const CurveRed& CR, const vector& Plist, const bigint& p) +vector > MapPointsToComponentGroup(const ComponentGroups& CG, const vector& Plist, const bigint& p) { int i,j,k,n=Plist.size(); vector > images; images.resize(n); if (n==0) return images; - - ComponentGroups CG(CR); - // Construct the component group and find its structure: + // Construct the local component group and find its structure: vector G=CG.ComponentGroup(p); #ifdef DEBUG_EGR @@ -754,31 +802,6 @@ return images; } -// returns m = the lcm of the exponents of the component groups at all -// bad primes (including infinity if real_too is 1), which is the lcm -// of the Tamagawa numbers (except: 2 when component group is of type -// 2,2). So with no further knowledge of the MW group we know that -// m*P is in the good-reduction subgroup for all P - -bigint ComponentGroups::Tamagawa_exponent(int real_too) -{ - const bigint one = BIGINT(1); - const bigint two = BIGINT(2); - bigint ans = one; - if(real_too && (conncomp==2)) ans = two; - - map::const_iterator ri = reduct_array.begin(); - for( ; ri!=reduct_array.end(); ri++) - { - int code=(ri->second).Kcode.code; - if((code%10==1)&&even((code-1)/10)) // Type I*m, m even: [2,2] - ans=lcm(ans,two); - else - ans=lcm(ans,BIGINT((ri->second).c_p)); - } - return ans; -} - // class Kodaira_code just holds an int which "codes" the type as follows: // (this coding originally from R.G.E.Pinch) // diff -Nru eclib-20190909/libsrc/elog.cc eclib-20210625/libsrc/elog.cc --- eclib-20190909/libsrc/elog.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/elog.cc 2021-06-25 09:53:34.000000000 +0000 @@ -103,8 +103,8 @@ cout<<" ("< ans; ans.push_back(cx); @@ -225,24 +225,59 @@ Point ellztopoint(Curvedata& E, Cperiods& per, const bigcomplex& z, const bigint& den) { if(is_zero(z)) {return Point(E);} +#ifdef DEBUG_EZP + cout<<"In ellztopoint() with z = "< CP = ellztopoint(E,per,z); + Point P(E); bigcomplex cx=CP[0],cy=CP[1]; bigint nx,ny,dx,dy; boundedratapprox(real(cx),nx,dx,den); - boundedratapprox(real(cy),ny,dy,den); #ifdef DEBUG_EZP cout<<"Rounded x = "< Plist = points_from_x(E, xP); +#ifdef DEBUG_EZP + cout<<"Candidates = "< 0) { + P = Plist[0]; + if (Plist.size()==2) // check we don't need -P instead + { + bigfloat wR = per.get_real_period().real(); + bigfloat zPreal = elliptic_logarithm(E, per, P).real(); + bigfloat d1 = (zPreal-z.real())/wR; + bigfloat d2 = (-zPreal-z.real())/wR; + d1 = abs(d1-round(d1)); + d2 = abs(d2-round(d2)); +#ifdef DEBUG_EZP + cout << "ellztopoint finds two rational points from\nz = "<< z< division_points(Curvedata& E, const Point& P, int m) +// With the MPFP option we set the bit precision to a high enough +// value. otherwise we cannot: this method will not work at all well +// for large examples unless MPFP is used. + +vector division_points(Curvedata& E, const Point& P, int m, int only_one) { - if(m==2) return division_points_by2(E,P); + if(m==2) + { + return division_points_by2(E,P); + } + +#ifdef MPFP // Multi-Precision Floating Point + int zero_flag = P.is_zero(); + long original_prec, new_prec; + if (!zero_flag) + { + bigint den = P.getZ(); + long nbits = I2long(Iceil(log(I2bigfloat(den))/log(to_bigfloat(2.0)))); +#ifdef DEBUG_DIVPT + cout<<"den= "< ans = division_points(E,cp,P,m, only_one); + +#ifdef MPFP + if (!zero_flag) + { + set_bit_precision(original_prec); +#ifdef DEBUG_DIVPT + cout<<"resetting bit precision back to "< division_points(Curvedata& E, Cperiods& per, const Point& P, int m) +vector division_points(Curvedata& E, Cperiods& per, const Point& P, int m, int only_one) { #ifdef DEBUG_DIVPT cout<<"division_points("<<(Curve)E<<","<0) + { + return ans; } + #ifdef DEBUG_DIVPT cout<<"posdisc= "< Qlist = division_points(E, P, m, 1); + if (Qlist.size() == 0) + { + return 0; + } + else + { + Q = Qlist[0]; + return 1; + } +} + // Returns a vector of solutions to m*Q=0 (including Q=0) // First version will compute the Cperiods itself, so best to use the @@ -426,9 +579,11 @@ void boundedratapprox(bigfloat x, bigint& a, bigint& b, const bigint& maxden) { - // cout<<"bounded ratapprox of "< eps ) @@ -443,5 +598,8 @@ a = x2; b = y2; if ( b < 0 ) {::negate(a); ::negate(b); } +#ifdef DEBUG_EZP + cout<<"bounded ratapprox gives a/b where\na = "<>ws; if(cin.eof()) return 0; // quit if EOF reached cin >> C0; if (verb) cout << endl; diff -Nru eclib-20190909/libsrc/heights.cc eclib-20210625/libsrc/heights.cc --- eclib-20190909/libsrc/heights.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/heights.cc 2021-06-25 09:53:34.000000000 +0000 @@ -22,43 +22,71 @@ ////////////////////////////////////////////////////////////////////////// #include // which includes curve.h - +#ifdef MPFP // use NTL to compute the determinant +#include +#else #define MAX_RANK_REG 50 // cannot ask for regulator of more than 50 points. +#endif bigfloat height(Point& P) { - // WARNING -- no check made of validity of point on curve bigfloat zero(to_bigfloat(0)); if ( P.is_zero() ) return zero; if (P.height >= zero) return P.height; // already calculated it if (order(P) > 0) {P.height = zero; return zero; } // zero height if torsion -// N.B. So if we ever ask a point its height it will compute its order. -// otherwise need to calculate it -// Add local heights at finite primes dividing discr(E) OR denom(P). -// The components for primes dividing denom(P) add to log(denom(x(P))); -// since P=(XZ:Y:Z^3), denom(P)=Z=gcd(XZ,Z^3), called "zroot" here, -// and so the contribution is log(denom(x(P))) = 2*log(zroot). -// This avoids factorizing the denominator. - - const bigint& zroot = gcd(P.getX(),P.getZ()); // = cube root of Z - bigfloat ans = realheight(P); - ans += 2*log(I2bigfloat(zroot)); - - const vector& bad_p = getbad_primes( *(P.E) ); - vector::const_iterator pr = bad_p.begin(); - while(pr!=bad_p.end()) + // N.B. So if we ever ask a point its height it will compute its order. + // otherwise need to calculate it + + // The local height at p will only be correctly computed by + // pheight() if the curve is minimal at p + + Curvedata* E = P.E; + int is_min = is_minimal(*E); + bigint u, r, s, t; + Curvedata Emin; + Point Pmin = P; + if (!is_min) + { + Emin = E->minimalize(u,r,s,t); + is_min = is_one(abs(u)); // then E was already minimal, no adjustments needed + } + if (!is_min) + { + Pmin = transform(P, &Emin, u, r, s, t); + } + + // Add local heights at finite primes dividing discr(E) OR denom(P). + // The components for primes dividing denom(P) add to log(denom(x(P))); + // since P=(XZ:Y:Z^3), denom(P)=Z=gcd(XZ,Z^3), called "zroot" here, + // and so the contribution is log(denom(x(P))) = 2*log(zroot). + // This avoids factorizing the denominator. + + const bigint& zroot = gcd(Pmin.getX(),Pmin.getZ()); // = cube root of Z + bigfloat h = realheight(Pmin); + + // contribution from primes dividing the denoinator: + h += 2*log(I2bigfloat(zroot)); + + vector bad_p = getbad_primes(Emin); + vector::iterator pr = bad_p.begin(); + for (pr = bad_p.begin(); pr!=bad_p.end(); pr++) { - const bigint& p = *pr++; - if(ndiv(p,zroot)) ans += pheight(P,p); + bigint p = *pr; + // we already have included the local height at p for primes p + // dividing the denominator + if(ndiv(p,zroot)) + h += pheight(Pmin,p); } - P.height = ans; - return ans; + P.height = h; + return h; } //#define DEBUG_HEIGHT bigfloat pheight(const Point& P, const bigint& pr) +// NB The local height at p will only be correctly computed by +// pheight() if the curve is minimal at p { #ifdef DEBUG_HEIGHT cout<<"In pheight with P = "<getbi(bb2,bb4,bb6,bb8); bigfloat b2 = I2bigfloat(bb2), b4 = I2bigfloat(bb4), @@ -158,6 +195,7 @@ t=2*abs(b4); if(t>H) H=t; t=2*abs(b6); if(t>H) H=t; t=abs(b8); if(t>H) H=t; + // NB We use decimal precision here since the formula for nlim (from // Silverman) is given in terms of decimal places required. long precision = decimal_precision(); @@ -165,6 +203,7 @@ cout<<"decimal precision = "<::iterator pe = ann.find(p); + if (pe!=ann.end()) + { + return pe->second; + } + long e = exponent(*this,p); + ann[p] = e; + return e; +} + +bigfloat CurveHeightConst::D(long n) // D_E(n) in the paper +{ + map::iterator DEn = DE.find(n); + if (DEn!=DE.end()) + { +#ifdef debugLB + cout << "stored D("<second <second; + } + // else compute and store it: + bigfloat ans = to_bigfloat(0); + primevar pr; + long p, e, pmax = (n+1)*(n+1); + for (p=pr.value(); p annihilators(const Curvedata& CD, long n) -{ - vector ans; - primevar pr; - CurveRed CR(CD); - while(n--) {ans.push_back(annihilator(CR,(long)pr)); pr++;} - return ans; -} - #if(0) // old code using x-intervals instead of [0,1]-intervals vector CurveHeightConst::canonicalHeightInterval(const bigfloat& target, long k) diff -Nru eclib-20190909/libsrc/interface.cc eclib-20210625/libsrc/interface.cc --- eclib-20190909/libsrc/interface.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/interface.cc 2021-06-25 09:53:34.000000000 +0000 @@ -313,6 +313,7 @@ switch(rounding) { case 0: // round to nearest + default: a = I2long(RoundToZZ(x)); return 1; case 1: // round up a = I2long(CeilToZZ(x)); return 1; @@ -330,34 +331,43 @@ #else // not MPFP // return value is 1 for success, else 0 -int longify(double x, long& a, int rounding=0) +int longify(double x, long& a, int rounding) // assume that direct coercion to long truncates fraction part // disregarding sign so rounds down if x>0, up if x<0 { - if (!is_long(x)) return 0; - if (x>0) + if ((x<=MAXLONG)&&(x>=MINLONG)) { - switch(rounding) + if (x>0) { - case 0: // round to nearest - a = (long)(x+0.5); return 1; - case 1: // round up - a = - (long)(-x+0.5); return 1; - case -1: // round down - a = (long)x; return 1; + switch(rounding) + { + case 0: // round to nearest + default: + a = (long)(x+0.5); return 1; + case 1: // round up + a = - (long)(-x+0.5); return 1; + case -1: // round down + a = (long)x; return 1; + } + } + else + { + switch(rounding) + { + case 0: // round to nearest + default: + a = - (long)(-x+0.5); return 1; + case 1: // round up + a = (long)x; return 1; + case -1: // round down + a = (long)(x-0.5); return 1; + } } } else { - switch(rounding) - { - case 0: // round to nearest - a = - (long)(-x+0.5); return 1; - case 1: // round up - a = (long)x; return 1; - case -1: // round down - a = (long)(x-0.5); return 1; - } + cerr<<"Attempt to convert "< Introotscubic(const bigint& a, const bigint& b, const bigint& c) -{ - ZZX f; vec_pair_ZZX_long factors; bigint cont; - SetCoeff(f,3); // sets it to 1 - SetCoeff(f,2,a); - SetCoeff(f,1,b); - SetCoeff(f,0,c); -//cout<<"About to factor the monic cubic "< iroots; - for(int i=0; i Introotsquartic(const bigint& a, const bigint& b, const bigint& c, const bigint& d) -{ - ZZX f; vec_pair_ZZX_long factors; bigint cont; - SetCoeff(f,4); // sets it to 1 - SetCoeff(f,3,a); - SetCoeff(f,2,b); - SetCoeff(f,1,c); - SetCoeff(f,0,d); - // cout<<"About to factor the monic quartic "< iroots; - for(int i=0; i +#ifdef TRACE_NTL_REF +#include +#endif + +// Construct an NTL mat_lzz_p (matrix mod p) from a mat mod pr + +mat_zz_p mat_zz_p_from_mat(const mat& M, scalar pr) +{ + long nr=M.nrows(), nc=M.ncols(); + long i, j; + +#ifdef TRACE_NTL_REF + cout<<"Creating an NTL mat_zz_p from a matrix with " << nr <<" rows and "<(M(i+1,j+1))); + } +#ifdef TRACE_NTL_REF + cout<<"--done."<(A.get(i,j)), pr); +#ifdef TRACE_NTL_REF + cout<<"--done."<(det), pr); +} + + // Possible FLINT_LEVEL values are as follows. // // 0: no FLINT support (or a version <2.3) diff -Nru eclib-20190909/libsrc/mrank1.cc eclib-20210625/libsrc/mrank1.cc --- eclib-20190909/libsrc/mrank1.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/mrank1.cc 2021-06-25 09:53:34.000000000 +0000 @@ -587,7 +587,12 @@ cout<<"Before sorting, phi = "<1) @@ -629,12 +639,20 @@ if (posdisc) { gettype(2); // get type 2s first as they are a subgroup of index 1 or 2 + if (!success) + return; if(!(have_eggpoint || have_large_quartics)) - gettype(1); + { + gettype(1); + if (!success) + return; + } } else { gettype(3); + if (!success) + return; } } // of getquartics1() @@ -1452,8 +1470,14 @@ #endif getquartics(); - - // cout<<"LOCAL INDEX "< unsat; + int sat_ok = satsieve.saturate(unsat, index, sat); + if(verbose) + { + cout<<"done"; + if (!sat_ok) + { + cout<<" (saturation failed for "<1) { basis = satsieve.getgens(); @@ -278,7 +288,7 @@ = mat_entry(j,i) = height_pairing(basis[i], basis[j]); } - } + } reg = det(height_pairs,rank); if(verbose) cout<<"Regulator = "<0) { - satsieve.set_points(basis); - if (verbose) cout<<"saturating up to "<1) - { - basis = satsieve.getgens(); - if(verbose) cout<<"Gained index "< unsat; + int sat_ok = satsieve.saturate(unsat, index, sat); + if(verbose) + { + cout<<"done"; + if (!sat_ok) + { + cout<<" (saturation failed for "<1) + { + basis = satsieve.getgens(); + if(verbose) cout<<"Gained index "<0) { - satsieve.reset_points(basis); - if (verbose) cout<<"saturating up to "<1) - { - basis = satsieve.getgens(); - if(verbose) cout<<"Gained index "< unsat; + int sat_ok = satsieve.saturate(unsat, index, sat); + if(verbose) + { + cout<<"done, index = "<1) + { + basis = satsieve.getgens(); + if(verbose) cout<<"Gained index "<& unsat, long sat_bd, int odd_primes_only) +int mw::saturate(long& index, vector& unsat, long sat_bd, long sat_low_bd) { if (verbose) cout<<"saturating basis..."<0) ok=satsieve.saturate(unsat,index,sat_bd,1,10,odd_primes_only); + if(rank>0) ok=satsieve.saturate(unsat,index,sat_bd,1,10, sat_low_bd); if(verbose) cout<<"done"<maninvector(p0); - if (nap<300) nap=300; + mvp=h1->maninvector(p0); + long nap_default = long(100*sqrt(modulus)); + if (nap> code >> dum >> C; - CurveRed CR(C); + CurveRed CR(Curvedata(C,0)); if (getconductor(CR)!=N) cerr<<"Wrong conductor "< +#define DEFAULT_PARI_SIZE 100000000 +#define DEFAULT_PARI_MAX_PRIME 1000000 -string -factor(const string n) +void eclib_pari_init(long max_prime=DEFAULT_PARI_MAX_PRIME) { if (!avma) { - long pari_size = strtol(getenv_with_default("PARI_SIZE", "1000000000").c_str(), NULL, 0); + long pari_size = strtol(getenv_with_default("PARI_SIZE", "DEFAULT_PARI_SIZE").c_str(), NULL, 0); if (pari_size==0) // e.g. syntax error in the environment variable PARI_SIZE - pari_size = 1000000000; + pari_size = DEFAULT_PARI_SIZE; #ifdef DEBUG_GPFACT std::cout<<"calling pari_init with pari_size = "<1) cout << "Invalid c-invariants" << endl; + } // We relax the closeness criterion here, but do not // ignore it completely since there have been cases where // c4,c6 were valid & give the right conductor but are not // actually correct. close = (c4c6err<0.01); - if(validc4c6&&close) // if(validc4c6) + if(validc4c6) { Curve C(ic4,ic6); Curvedata CD(C,1); diff -Nru eclib-20190909/libsrc/points.cc eclib-20210625/libsrc/points.cc --- eclib-20190909/libsrc/points.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/points.cc 2021-06-25 09:53:34.000000000 +0000 @@ -300,10 +300,27 @@ return ans; } +// comparison function for sorting torsion points (on the same curve) +// We sort by (1) order of point, (2) denominator, (3) X-coordinate, +// (4) y-coordinate -// find all the torsion points on a curve (Curvedata member function) +struct Point_comparer { + bool operator()(Point& P, Point& Q) + { + int s = order(P)-order(Q); + if(s) return (s<0); // true if P has smaller order + bigint t = P.getZ()-Q.getZ(); + if(!is_zero(t)) return (t<0); // true if P has smaller Z (denominator) + t = P.getX()-Q.getX(); + if(!is_zero(t)) return (t<0); // true if P has smaller X + t = P.getY()-Q.getY(); + return (t<0); // true if P has smaller Y + } +} + Point_cmp; -vector old_torsion_points(Curvedata& E); // code is below +// Now to sort a list Plist of points in place, do +// ::sort(Plist.begin(), Plist.end(), Point_cmp); long Curvedata::get_ntorsion() { @@ -384,6 +401,7 @@ else two_tors.push_back(Point(E,ei,BIGINT(0),BIGINT(1))); } + ::sort(two_tors.begin(), two_tors.end(), Point_cmp); #ifdef DEBUG_TORSION cout<<"\ntwo_torsion() returning "< old_torsion_points(Curvedata& E) +//#define DEBUG_DIVISION_POINTS 1 +vector Point::division_points(int m) // list of Q s.t. n*Q=this { - if ( E.isnull() ) return vector(0); - bigint a1,a2,a3,a4,a6,sa2,sa4,sa6, d, x, y ; - E.getai(a1,a2,a3,a4,a6); - long i,nroots; int scaled_flag; - vector points; - points.push_back(Point(E)) ; // zero point - if ( (sign(a1)==0) && (sign(a3)==0) ) - {sa2=a2; sa4=a4; sa6=a6; scaled_flag=0; } - else - {sa2 = a1*a1 + 4*a2; - sa4 = 8*a1*a3 + 16*a4; - sa6 = 16*a3*a3 + 64*a6; - scaled_flag=1; - } - d = sa2*sa2*(sa4*sa4 - 4*sa2*sa6) + 18*sa2*sa4*sa6 - - 4*sa4*sa4*sa4 - 27*sa6*sa6; - Point p; - -// First test y=0 for points of order 2: - - vector xlist = Introotscubic(sa2, sa4, sa6); - nroots = xlist.size(); - for (i=0; i ans; + vector Qs; + Point Q; + if (is_torsion()) { - x = xlist[i]; - if (scaled_flag) p.init(E, 2*x, - a1*x - 4*a3, BIGINT(8)); - else p.init(E, x, BIGINT(0)); - points.push_back(p); + Qs = torsion_points(*E); + for (vector::iterator Qi = Qs.begin(); Qi!=Qs.end(); Qi++) + { + Q = *Qi; + if (m * Q == *this) + ans.push_back(Q); + } + return ans; } + ZPoly pol = division_points_X_pol(E->a1,E->a2,E->a3,E->a4,E->a6, m, X, Z); +#ifdef DEBUG_DIVISION_POINTS + cout << "division poly = " << pol << endl; +#endif -// Now test y such that y^2 divides d: - - vector possible_y( sqdivs(d) ); - vector::iterator yvar=possible_y.begin(); - while( yvar!=possible_y.end()) - { - y = *yvar++; - xlist = Introotscubic(sa2, sa4, sa6-y*y); - nroots = xlist.size(); - for (i=0; i xQs = roots(pol); +#ifdef DEBUG_DIVISION_POINTS + cout << " with roots " << xQs << endl; +#endif + for(vector::iterator xQi = xQs.begin(); xQi!=xQs.end(); xQi++) { - x = xlist[i]; - if (scaled_flag) p.init(E, 2*x, y - a1*x - 4*a3, BIGINT(8)); - else p.init(E, x, y); - if (order(p) > 0) + Qs = points_from_x(*E, *xQi); + // will have length 0 or 2 since non-torsion, and we only want + // exctly one when there two so, must check which works + if (Qs.size()>0) { - points.push_back(p); - points.push_back(-p); // N.B. order>2 here! + Q = Qs[0]; + if (m*Q == *this) + { + ans.push_back(Q); + } + else + { + ans.push_back(-Q); + } } } - } - return points; + return ans; } // end of file: points.cc diff -Nru eclib-20190909/libsrc/pointsmod.cc eclib-20210625/libsrc/pointsmod.cc --- eclib-20190909/libsrc/pointsmod.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/pointsmod.cc 2021-06-25 09:53:34.000000000 +0000 @@ -352,15 +352,15 @@ return get_pbasis_from_roots(p,xi); } -vector curvemodqbasis::get_pbasis_via_divpol(int p, const vector& pdivpol) +vector curvemodqbasis::get_pbasis_via_divpol(int p, const ZPoly& pdivpol) { vector ans; if((n%p)!=0) return ans; galois_field Fq = get_field(*this); NewFqPoly(Fq,pdivpolmodq); - long i, deg = pdivpol.size()-1; - SetDegree(pdivpolmodq,deg); - for (i=0; i<=deg; i++) SetCoeff(pdivpolmodq,i,ZtoGF(Fq,pdivpol[i])); + long i, d = deg(pdivpol); + SetDegree(pdivpolmodq,d); + for (i=0; i<=d; i++) SetCoeff(pdivpolmodq,i,ZtoGF(Fq,coeff(pdivpol,i))); #ifdef DEBUG_PBASIS cout< introots(const ZPoly& f) +{ +#ifdef TRACE_ROOTS + cout<<"Finding integer roots of polynomial f = "< ratroots = roots(f); + vector ans; + if (ratroots.size()==0) + return ans; + for(vector::iterator ri=ratroots.begin(); ri!=ratroots.end(); ri++) + { + bigrational r = *ri; + if (den(r)==1) + ans.push_back(num(r)); + } + sort(ans.begin(), ans.end()); + return ans; +} + +vector roots(const vector& coeffs) +{ +#ifdef TRACE_ROOTS + cout<<"Finding rational roots of polynomial f with coefficients "< ans; + int i, d = coeffs.size()-1; // degree + if(d<1) + return ans; + for(i=0; i<=d; i++) + SetCoeff(f,d-i,coeffs[i]); +#ifdef TRACE_ROOTS + cout<<"f = "< Introotscubic(const bigint& a, const bigint& b, const bigint& c) +{ + ZZX f; + SetCoeff(f,3); // sets it to 1 + SetCoeff(f,2,a); + SetCoeff(f,1,b); + SetCoeff(f,0,c); + return introots(f); +} + +vector Introotsquartic(const bigint& a, const bigint& b, const bigint& c, const bigint& d) +{ + ZZX f; vec_pair_ZZX_long factors; bigint cont; + SetCoeff(f,4); // sets it to 1 + SetCoeff(f,3,a); + SetCoeff(f,2,b); + SetCoeff(f,1,c); + SetCoeff(f,0,d); + return introots(f); +} + // find the number of roots of X^3 + bX^2 + cX + d = 0 (mod p) int nrootscubic(const bigint& b, const bigint& c, const bigint& d, const bigint& p) { diff -Nru eclib-20190909/libsrc/saturate.cc eclib-20210625/libsrc/saturate.cc --- eclib-20190909/libsrc/saturate.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/libsrc/saturate.cc 2021-06-25 09:53:34.000000000 +0000 @@ -46,13 +46,43 @@ TLrank=0; qvar.init(); qvar++; qvar++; // skip past 2 and 3 stuck_counter=0; - Eqptr=Eqlist.begin(); - newq=0; + the_index_bound = BIGINT(0); +} + +// initialize index bound +void saturator::set_index_bound(int egr) +{ + the_index_bound = index_bound(Plist,egr,(verbose>1)); +} + +// return current index bound (compute if necessary) +bigint saturator::get_index_bound(int egr) +{ + if (is_zero(the_index_bound)) + set_index_bound(egr); + return the_index_bound; +} + +// test whether p is less than the saturation index, or a Tamagawa prime +int saturator::trivially_saturated(long p) +{ + int t = ((p>the_index_bound) + && + (find(tam_primes.begin(), tam_primes.end(), p) == tam_primes.end())); + // if (t) + // { + // cout << "No need to saturate at " << p + // << ", as it is greater than the current index bound " << the_index_bound + // << " and not a Tamagawa prime." << endl; + // } + return t; } int saturator::test_saturation(int pp, int ms) -{ +{ p=pp; + if (trivially_saturated(p)) + return 1; // success // We add a basis for the torsion/p to the given points: Plistx=Plist; Plistp = pCoTorsion(AllTorsion,p); @@ -71,15 +101,13 @@ if(use_div_pols) { - pdivpol = makepdivpol(E,p); + pdivpol = division_polynomial(E,p); //cout<2) + cout<<"q="<2) + cout<<"Setting order mod "<second; + if (verbose>2) + cout<<"reusing order mod "<2) + cout<<"Order mod "<10)); - Eqlist.push_back(Eq); + Emodq[q] = Eq; sieve.assign(Eq); + q_tally[q] = 0; } else { - sieve.assign(*Eqptr); - Eqptr++; - newq=(Eqptr==Eqlist.end()); - // cout<<"Using stored reduced curve mod "<second); + // cout<<"Using stored reduced curve mod "<1) cout<<"Using q = "<maxq) + { + maxq=q; + maxp=p; + } mat_l TLim = sieve.map_points(Plistx); if(verbose>2) { @@ -182,7 +263,7 @@ if(TLrank==rank) return 0; // no enlargement; should not be called in this case vec_l ker = basis(pkernel(TLimage, p)).col(1); if(verbose>0) cout<<"possible kernel vector = "<0) cout<<"This point may be in "< Pi; - long prec, original_prec; - if(order(Q)==-1) // non-torsion point - { - // cout << "[attempting to divide by "< newQlist = Q.division_points(p); + if (newQlist.size()>0) { - prec = original_prec = bit_precision(); - //cout << "Saving bit precision "<0) { - cout<<"...but it isn't! (this may be due to insufficient precision:"; -#ifdef MPFP - cout << " bit precision " <0) cout<<"...and it is! "<0) cout<<"Replacing old generator #"<<(keepi+1) - <<" with new generator "<0) cout<<"Reducing index bound from " << the_index_bound; + the_index_bound /= p; + if(verbose>0) cout<<" to " << the_index_bound << endl; // reset TL matrix and q iteration TLimage=mat_l(0,rank); // holds TL image in echelon form TLrank=0; qvar.init(); qvar++; qvar++; // skip past 2 and 3 stuck_counter=0; - Eqptr=Eqlist.begin(); - newq=0; return 1; } @@ -250,10 +334,13 @@ int saturator::do_saturation(int pp, int maxntries) { p=pp; - if(verbose>1) + if(verbose>1) cout<<"Testing "<1) + if (trivially_saturated(p)) + return 0; // index=1, log=0 + if(test_saturation(p,n_aux_stuck)) + return 0; + if(verbose>1) cout<<"Points not (yet) proved to be "<

=0)) - { - cout<<"Points have successfully been "<

0) cout<<"Index gain = "<0) while(pi--) index *= p; - pvar++; - p=pvar; - } - return index; -} - int l2i(long i) {return (int)i;} vector lv2iv(const vector& v) { @@ -314,7 +380,7 @@ } int saturator::do_saturation(vector plist, - bigint& index, vector& unsat, + long& index, vector& unsat, int maxntries) { vectoriplist = lv2iv(plist), iunsat; @@ -324,7 +390,7 @@ } int saturator::do_saturation(vector plist, - bigint& index, vector& unsat, + long& index, vector& unsat, int maxntries) { unsigned int i; int pi, p; @@ -334,6 +400,8 @@ for(i=0; i=0, -1 if failed if(pi<0) @@ -364,56 +432,114 @@ return success; } -int saturator::saturate(vector& unsat, bigint& index, long sat_bd, - int egr, int maxntries, int odd_primes_only) +int saturator::saturate(vector& unsat, long& index, + long sat_bd, long sat_low_bd, + int egr, int maxntries) { // Determine the primes at which saturation is necessary: all those // up to index bound (but truncated at sat_bd unless this is -1), // and also the "Tamagawa primes" if the egr option is set vector satprimes; - primevar pr; - if(odd_primes_only) pr++; // useful after a 2-descent + primevar pr; + while(pr.value()1)); - bigint ib0=ib; - if(sat_bd==-1) sat_bd=SAT_MAX_PRIME; - int bound_too_big = (ib>sat_bd); + + bigint ib = get_index_bound(egr); if(verbose) - cout<<"Saturation index bound = "< "<::iterator pi = tam_primes.begin(); pi!=tam_primes.end(); pi++) + if (*pi > ib) + { + if (verbose) + cout << "adding Tamagawa index prime " << *pi << " to saturation list" << endl; + satprimes.push_back(*pi); + } + } + + // do the saturation. Will return ok iff we succeeded in saturating + // at all p in satprimes, otherwise the failures will be in unsat. + + int sat_ok = do_saturation(satprimes, index, unsat, maxntries); + return sat_ok; +} + +void saturator::show_q_tally() +{ + cout << "Summary of auxiliary primes used" <::iterator qcount; + cout << "Number of q used: " << q_tally.size() << endl; + cout << "Maximum q used: " << maxq << " (used for p="<first; + c = qcount->second; + if (c) + cout << q << "\t" << c <& points, - bigint& index, vector& unsat, - long sat_bd, int egr, int verbose) +int saturate_points(Curvedata& C, vector& points, + long& index, vector& unsat, + long sat_bd, long sat_low_bd, + int egr, int verbose) { saturator sieve(&C,verbose); sieve.set_points(points); - int ans = sieve.saturate(unsat, index, sat_bd, egr, (verbose)); + int ans = sieve.saturate(unsat, index, sat_bd, sat_low_bd, egr); points = sieve.getgens(); + if (verbose>0) + sieve.show_q_tally(); return ans; } @@ -492,15 +621,19 @@ // points // -bigint index_bound(Curvedata* C, vector& points, +bigint index_bound(vector& points, int egr, int verbose) { - if(verbose) - cout<<"Entering index_bound("<<(Curve)(*C)<<")"<::const_iterator vi; - for(vi=v.entries.begin(), j=0; - vi!=v.entries.end(); vi++, j++) + + coli++; + for(map::const_iterator vi=v.entries.begin(); + vi!=v.entries.end(); vi++) { - col[i][j+1] = vi->first; - val[i][j] = vi->second; + *coli++ = vi->first; + *vali++ = vi->second; } + + // check + // if (row(i+1) != v) + // { + // cerr << "error in smat::setrow(int, svec):"; + // cerr << "v = "< 0 ) // this is a pivotal column for row r + { + k++; // the k'th pivot is (r,c) + pc[k] = c; // pc[k] is its column, c + } + else // non-pivotal column + { + npc[++ny] = c; // record c as a non-pivotal column + } + } +#if TRACE_ELIM + cout << "pivotal columns: "<=0; i--) // set B[i] + { + bij = bi = B[i]; + bij_nz = bi_nz; + ij_nz = i_nz; + + ir = elim_row[i]; + int nv=0; // counts # non-zero v + + for(t=0; ti + { + v = -elem(ir+1, npc[j+1]); + Rt = R + rank-1; + Bt = B + rank-1; + t = rank-1-i; + while(t--) + { + rr = *Rt--; + if (rr) + { + ss = (*Bt)[j]; + if (ss) + { + v = mod(v - xmodmul(rr, ss, modulus), modulus); + } + } + Bt--; // must be outside the if(rr) + } + *bij++ = v; + if (v) + { + nv++; + *bij_nz++ = v; + *ij_nz++ = j+1; + } + } +#if TRACE_ELIM + cout<<" setting row "<< position[ir]-1 <<" (from 0) of basis: "<< nv <<" non-zero entries out of "< co[0]) // there are more entries in this row than the + // constructor gave us + { + delete [] co; + delete [] va; + co = basis.col[ir] = new int[nv+1]; + va = basis.val[ir] = new scalar[nv]; + } + *co++ = nv; + size_t nbytes = nv*sizeof(int); + memmove(co,i_nz,nbytes); + nbytes = nv*sizeof(scalar); + memmove(va,bi_nz,nbytes); + +#if TRACE_ELIM + cout<<" finished setting row "<< ir << endl; +#endif + } + + /* release memory dynamically allocated in this function using new */ + + b = B; + i = rank; + while(i--) + delete [] *b++; + delete [] B; + // delete [] elim_row_inv; + delete [] R; + delete [] bi_nz; + delete [] i_nz; + + #if TRACE_ELIM + stop_time(); + cout<<"time for computing basis: "; + show_time(); + cout< -1 ) { pc[++k] = i; new_row[k-1] = elim_col[i-1]; } - else npc[++ny] = i; + if( elim_col[i-1] > -1 ) + { + pc[++k] = i; + new_row[k-1] = elim_col[i-1]; + } + else + { + npc[++ny] = i; + } } /* write basis for kernel */ @@ -454,9 +696,9 @@ for( n = 1; n <= nullity; n++ ) { int i = npc[n]-1; - basis.col[i][0] = 1; //this much storage was granted in the + basis.col[i][0] = 1; //this much storage was granted in the basis.col[i][1] = n; // in the constructor. - basis.val[i][0] = denom; + basis.val[i][0] = 1; } scalar *aux_val = new scalar [nco]; @@ -494,7 +736,7 @@ delete[]aux_col; #if TRACE_ELIM cout<<"Finished constructing basis for kernel"<& pdivpol, int verb) +void TLSS::init(int pp, const ZPoly& pdivpol, int verb) { verbose=verb; p=pp; @@ -118,22 +118,12 @@ #ifdef debugTL cout<<"after multiplying by "< #include +string eclib_version() +{ + string v = VERSION; // defined by autotools, of the form v

+ return v; +} + +vector eclib_date() +{ + vector date; + string v = eclib_version(); // 8 chars long, yyyymmdd + date.push_back(atoi(v.substr(0,4).c_str())); // chars 0-4 + date.push_back(atoi(v.substr(4,2).c_str())); // chars 5-6 + date.push_back(atoi(v.substr(6,2).c_str())); // chars 7-8 + return date; +} -void show_version() +void show_version(ostream& os) { - cerr << "Version compiled on " << __DATE__ << " at " << __TIME__ << " by GCC " << __VERSION__ << "\n"; -#ifdef MPFP - cerr << "using NTL bigints and NTL real and complex multiprecision floating point"; + os << "eclib version " << VERSION << ", "; +#ifdef NO_MPFP + os << "using NTL bigints but no multiprecision floating point"; #else - cerr << "using NTL bigints but no multiprecision floating point"; + os << "using NTL bigints and NTL real and complex multiprecision floating point"; #endif - cerr<0? 1: -1));} + +int compare_eclib_version(int y, int m, int d) +{ + vector date = eclib_date(); + int s; + // compare years + s = sgn(date[0] - y); + if (s!=0) // different years, OK if y is smaller + return s; + // same year, compare months + s = sgn(date[1] - m); + if (s!=0) // different months, OK if m is smaller + return s; + // same year and month, compare days + return sgn(date[2] - d); +} diff -Nru eclib-20190909/m4/ax_pthread.m4 eclib-20210625/m4/ax_pthread.m4 --- eclib-20190909/m4/ax_pthread.m4 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/m4/ax_pthread.m4 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,492 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also to link with them as well. For example, you might link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threaded programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2011 Daniel Richard G. +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 26 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_SED]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on Tru64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then + ax_pthread_save_CC="$CC" + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"]) + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS]) + AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes]) + AC_MSG_RESULT([$ax_pthread_ok]) + if test "x$ax_pthread_ok" = "xno"; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + CC="$ax_pthread_save_CC" + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 +# (Note: HP C rejects this with "bad form for `-t' option") +# -pthreads: Solaris/gcc (Note: HP C also rejects) +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads and +# -D_REENTRANT too), HP C (must be checked before -lpthread, which +# is present but should not be used directly; and before -mthreads, +# because the compiler interprets this as "-mt" + "-hreads") +# -mthreads: Mingw32/gcc, Lynx/gcc +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case $host_os in + + freebsd*) + + # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) + # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) + + ax_pthread_flags="-kthread lthread $ax_pthread_flags" + ;; + + hpux*) + + # From the cc(1) man page: "[-mt] Sets various -D flags to enable + # multi-threading and also sets -lpthread." + + ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" + ;; + + openedition*) + + # IBM z/OS requires a feature-test macro to be defined in order to + # enable POSIX threads at all, so give the user a hint if this is + # not set. (We don't define these ourselves, as they can affect + # other portions of the system API in unpredictable ways.) + + AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING], + [ +# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) + AX_PTHREAD_ZOS_MISSING +# endif + ], + [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])]) + ;; + + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (N.B.: The stubs are missing + # pthread_cleanup_push, or rather a function called by this macro, + # so we could check for that, but who knows whether they'll stub + # that too in a future libc.) So we'll check first for the + # standard Solaris way of linking pthreads (-mt -lpthread). + + ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" + ;; +esac + +# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) + +AS_IF([test "x$GCC" = "xyes"], + [ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"]) + +# The presence of a feature test macro requesting re-entrant function +# definitions is, on some systems, a strong hint that pthreads support is +# correctly enabled + +case $host_os in + darwin* | hpux* | linux* | osf* | solaris*) + ax_pthread_check_macro="_REENTRANT" + ;; + + aix*) + ax_pthread_check_macro="_THREAD_SAFE" + ;; + + *) + ax_pthread_check_macro="--" + ;; +esac +AS_IF([test "x$ax_pthread_check_macro" = "x--"], + [ax_pthread_check_cond=0], + [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"]) + +# Are we compiling with Clang? + +AC_CACHE_CHECK([whether $CC is Clang], + [ax_cv_PTHREAD_CLANG], + [ax_cv_PTHREAD_CLANG=no + # Note that Autoconf sets GCC=yes for Clang as well as GCC + if test "x$GCC" = "xyes"; then + AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG], + [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */ +# if defined(__clang__) && defined(__llvm__) + AX_PTHREAD_CC_IS_CLANG +# endif + ], + [ax_cv_PTHREAD_CLANG=yes]) + fi + ]) +ax_pthread_clang="$ax_cv_PTHREAD_CLANG" + +ax_pthread_clang_warning=no + +# Clang needs special handling, because older versions handle the -pthread +# option in a rather... idiosyncratic way + +if test "x$ax_pthread_clang" = "xyes"; then + + # Clang takes -pthread; it has never supported any other flag + + # (Note 1: This will need to be revisited if a system that Clang + # supports has POSIX threads in a separate library. This tends not + # to be the way of modern systems, but it's conceivable.) + + # (Note 2: On some systems, notably Darwin, -pthread is not needed + # to get POSIX threads support; the API is always present and + # active. We could reasonably leave PTHREAD_CFLAGS empty. But + # -pthread does define _REENTRANT, and while the Darwin headers + # ignore this macro, third-party headers might not.) + + PTHREAD_CFLAGS="-pthread" + PTHREAD_LIBS= + + ax_pthread_ok=yes + + # However, older versions of Clang make a point of warning the user + # that, in an invocation where only linking and no compilation is + # taking place, the -pthread option has no effect ("argument unused + # during compilation"). They expect -pthread to be passed in only + # when source code is being compiled. + # + # Problem is, this is at odds with the way Automake and most other + # C build frameworks function, which is that the same flags used in + # compilation (CFLAGS) are also used in linking. Many systems + # supported by AX_PTHREAD require exactly this for POSIX threads + # support, and in fact it is often not straightforward to specify a + # flag that is used only in the compilation phase and not in + # linking. Such a scenario is extremely rare in practice. + # + # Even though use of the -pthread flag in linking would only print + # a warning, this can be a nuisance for well-run software projects + # that build with -Werror. So if the active version of Clang has + # this misfeature, we search for an option to squash it. + + AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG], + [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown + # Create an alternate version of $ac_link that compiles and + # links in two steps (.c -> .o, .o -> exe) instead of one + # (.c -> exe), because the warning occurs only in the second + # step + ax_pthread_save_ac_link="$ac_link" + ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' + ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` + ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" + ax_pthread_save_CFLAGS="$CFLAGS" + for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do + AS_IF([test "x$ax_pthread_try" = "xunknown"], [break]) + CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" + ac_link="$ax_pthread_save_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [ac_link="$ax_pthread_2step_ac_link" + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])], + [break]) + ]) + done + ac_link="$ax_pthread_save_ac_link" + CFLAGS="$ax_pthread_save_CFLAGS" + AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no]) + ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" + ]) + + case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in + no | unknown) ;; + *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; + esac + +fi # $ax_pthread_clang = yes + +if test "x$ax_pthread_ok" = "xno"; then +for ax_pthread_try_flag in $ax_pthread_flags; do + + case $ax_pthread_try_flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -mt,pthread) + AC_MSG_CHECKING([whether pthreads work with -mt -lpthread]) + PTHREAD_CFLAGS="-mt" + PTHREAD_LIBS="-lpthread" + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag]) + PTHREAD_CFLAGS="$ax_pthread_try_flag" + ;; + + pthread-config) + AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) + AS_IF([test "x$ax_pthread_config" = "xno"], [continue]) + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag]) + PTHREAD_LIBS="-l$ax_pthread_try_flag" + ;; + esac + + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include +# if $ax_pthread_check_cond +# error "$ax_pthread_check_macro must be defined" +# endif + static void *some_global = NULL; + static void routine(void *a) + { + /* To avoid any unused-parameter or + unused-but-set-parameter warning. */ + some_global = a; + } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + AC_MSG_RESULT([$ax_pthread_ok]) + AS_IF([test "x$ax_pthread_ok" = "xyes"], [break]) + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = "xyes"; then + ax_pthread_save_CFLAGS="$CFLAGS" + ax_pthread_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_CACHE_CHECK([for joinable pthread attribute], + [ax_cv_PTHREAD_JOINABLE_ATTR], + [ax_cv_PTHREAD_JOINABLE_ATTR=unknown + for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], + [int attr = $ax_pthread_attr; return attr /* ; */])], + [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break], + []) + done + ]) + AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ + test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ + test "x$ax_pthread_joinable_attr_defined" != "xyes"], + [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], + [$ax_cv_PTHREAD_JOINABLE_ATTR], + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + ax_pthread_joinable_attr_defined=yes + ]) + + AC_CACHE_CHECK([whether more special flags are required for pthreads], + [ax_cv_PTHREAD_SPECIAL_FLAGS], + [ax_cv_PTHREAD_SPECIAL_FLAGS=no + case $host_os in + solaris*) + ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" + ;; + esac + ]) + AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ + test "x$ax_pthread_special_flags_added" != "xyes"], + [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" + ax_pthread_special_flags_added=yes]) + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + [ax_cv_PTHREAD_PRIO_INHERIT], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[int i = PTHREAD_PRIO_INHERIT; + return i;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ + test "x$ax_pthread_prio_inherit_defined" != "xyes"], + [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.]) + ax_pthread_prio_inherit_defined=yes + ]) + + CFLAGS="$ax_pthread_save_CFLAGS" + LIBS="$ax_pthread_save_LIBS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != "xyes"; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + +AC_SUBST([PTHREAD_LIBS]) +AC_SUBST([PTHREAD_CFLAGS]) +AC_SUBST([PTHREAD_CC]) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test "x$ax_pthread_ok" = "xyes"; then + ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff -Nru eclib-20190909/Makefile.am eclib-20210625/Makefile.am --- eclib-20190909/Makefile.am 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/Makefile.am 2021-06-25 09:53:34.000000000 +0000 @@ -1,2 +1,4 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libsrc tests progs doc man +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = eclib.pc diff -Nru eclib-20190909/progs/h1bsd.cc eclib-20210625/progs/h1bsd.cc --- eclib-20190909/progs/h1bsd.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/h1bsd.cc 2021-06-25 09:53:34.000000000 +0000 @@ -42,9 +42,9 @@ n--; cout<0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { newforms nf(n,0); int noldap=25; diff -Nru eclib-20190909/progs/h1bsdcurisog.cc eclib-20210625/progs/h1bsdcurisog.cc --- eclib-20190909/progs/h1bsdcurisog.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/h1bsdcurisog.cc 2021-06-25 09:53:34.000000000 +0000 @@ -62,7 +62,7 @@ { set_precision(35); - long limit, n=1, hlim1=10, hlim2=15; + long limit, n=2, hlim1=10, hlim2=15; bigint nn; int verbose=0; int filenamesize=30; @@ -84,9 +84,9 @@ n--; cerr<0) { cerr<<"Enter level: "; cin>>n; + while (n>1) { cerr<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { nn=n; // Temporary code: check that n is square-free @@ -171,7 +171,7 @@ cout< unsat; + long index; vector unsat; int sat_ok = mwbasis.saturate(index,unsat); if(!sat_ok) { diff -Nru eclib-20190909/progs/h1clist.cc eclib-20210625/progs/h1clist.cc --- eclib-20190909/progs/h1clist.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/h1clist.cc 2021-06-25 09:53:34.000000000 +0000 @@ -43,10 +43,10 @@ int main(void) { - int prec0 = 75; + int prec0 = 100; int maxprec = 300; int prec = prec0; - int delta_prec = 30; + int delta_prec = 50; set_precision(prec); int limit,n=1; string code; @@ -62,9 +62,9 @@ while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { newforms nf(n,0); int noldap=25; diff -Nru eclib-20190909/progs/h1curve.cc eclib-20210625/progs/h1curve.cc --- eclib-20190909/progs/h1curve.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/h1curve.cc 2021-06-25 09:53:34.000000000 +0000 @@ -54,10 +54,10 @@ int main(void) { - int prec0 = 75; - int maxprec = 300; + int prec0 = 100; + int maxprec = 500; int prec = prec0; - int delta_prec = 30; + int delta_prec = 50; set_precision(prec); int verb=0; #ifdef SINGLE @@ -84,9 +84,9 @@ } while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { newforms nf(n,verb); int noldap=25; diff -Nru eclib-20190909/progs/h1first.cc eclib-20210625/progs/h1first.cc --- eclib-20190909/progs/h1first.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/h1first.cc 2021-06-25 09:53:34.000000000 +0000 @@ -52,11 +52,11 @@ while (n0) + while (n>1) #endif { cout<<"\n\nEnter level: "; cin>>n; #endif - if (n>0) + if (n>1) { if (curve_output) curve_filename=single_curve_filename(n); diff -Nru eclib-20190909/progs/in/pcurve.in eclib-20210625/progs/in/pcurve.in --- eclib-20190909/progs/in/pcurve.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/in/pcurve.in 2021-06-25 09:53:34.000000000 +0000 @@ -1 +1 @@ -1 10 100 11 11 1 +0 10 100 11 11 1 diff -Nru eclib-20190909/progs/indep_test.cc eclib-20210625/progs/indep_test.cc --- eclib-20190909/progs/indep_test.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/indep_test.cc 2021-06-25 09:53:34.000000000 +0000 @@ -46,7 +46,7 @@ cin>>ws; if(cin.eof()) {cout<> E; if ( E.isnull() ) exit(0); - Curvedata C(E); + Curvedata C(E, 0); cout << "Curve " << (Curve)C << endl; Point P(C); cout<<"enter number of points: "; diff -Nru eclib-20190909/progs/Makefile.am eclib-20210625/progs/Makefile.am --- eclib-20190909/progs/Makefile.am 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/Makefile.am 2021-06-25 09:53:34.000000000 +0000 @@ -16,7 +16,7 @@ AM_LDFLAGS = $(FLINT_LDFLAGS) $(NTL_LDFLAGS) $(PARI_LDFLAGS) $(LDFLAGS_BOOST) $(PTHREAD_CFLAGS) $(PTHREAD_LDFLAGS) LIBS = $(top_builddir)/libsrc/libec.la $(FLINT_LIBS) $(PARI_LIBS) $(NTL_LIBS) $(BOOST_LIBS) $(PTHREAD_LIBS) -check_run = echo "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(prog_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && diff $${prog}.testout $(prog_output_dir)/$${prog}.out || exit $$? +check_run = echo -n "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(prog_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && echo "$${prog} completed" && diff $${prog}.testout $(prog_output_dir)/$${prog}.out || exit $$? ################ PROCS (conics & cubics programs) ################# diff -Nru eclib-20190909/progs/moreap.cc eclib-20210625/progs/moreap.cc --- eclib-20190909/progs/moreap.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/moreap.cc 2021-06-25 09:53:34.000000000 +0000 @@ -53,7 +53,7 @@ cout<<"Enter first and last N: ";cin>>n>>lastn; n--; while (n>n, n>0) { + while (cout<<"Enter level: ", cin>>n, n>1) { cout << "How many primes for Hecke eigenvalues? "; cin >> stopp; cout << endl; #endif diff -Nru eclib-20190909/progs/mwrank.cc eclib-20210625/progs/mwrank.cc --- eclib-20190909/progs/mwrank.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/mwrank.cc 2021-06-25 09:53:34.000000000 +0000 @@ -39,7 +39,7 @@ opt.set(argc, argv); int verbose = (opt.get_verbose()); //opt.show(); - if(!opt.get_quiet()) {opt.banner(1); show_version();} + if(!opt.get_quiet()) {opt.banner(cerr); show_version(cerr);} #ifdef MPFP long bit_precision=opt.get_precision(); set_precision(bit_precision); diff -Nru eclib-20190909/progs/nfcount.cc eclib-20210625/progs/nfcount.cc --- eclib-20190909/progs/nfcount.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/nfcount.cc 2021-06-25 09:53:34.000000000 +0000 @@ -33,7 +33,7 @@ cout<<"Enter first and last N: ";cin>>firstn>>limit; n=firstn-1; cout<0) + if (n>1) { if(verbose) cout << ">>> Level " << n << " <<< "; int num=0, nap=0, naq=0; diff -Nru eclib-20190909/progs/nfhpcurve.cc eclib-20210625/progs/nfhpcurve.cc --- eclib-20190909/progs/nfhpcurve.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/nfhpcurve.cc 2021-06-25 09:53:34.000000000 +0000 @@ -49,7 +49,7 @@ { init_time(); start_time(); - long n=1, stopp; // have a dud (but positive) value of n here to avoid mishaps + long n=2, stopp; // have a dud (but positive) value of n here to avoid mishaps int output, curve_output, verbose; long maxn = MAXNY; long dmax = MAXD; @@ -73,9 +73,9 @@ cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; cout<<"\n"; + while (n>1) { cout<<"Enter level: "; cin>>n; cout<<"\n"; #endif - if (n>0) + if (n>1) { if (curve_output) curve_out_filename = single_curve_filename(n); @@ -293,7 +293,7 @@ delete[]success; delete[]curves; -} // end of if(n>0) - } // end of while(n>0) or while(n1) + } // end of while(n>1) or while(n>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << "\n>>>Level " << n; // Temporary code to skip non-square-free levels @@ -208,7 +208,7 @@ } } } - } // end of if(n>0) - } // end of while(n>0) or while(n1) + } // end of while(n>1) or while(n>detail; + cerr << "See details? "; cin>>detail; //#endif - cout << "Enter max d: "; cin>>dmax; - cout << "Enter max scaling factor for periods: "; cin>>maxn; + cerr << "Enter max d: "; cin>>dmax; + cerr << "Enter max scaling factor for periods: "; cin>>maxn; #ifdef AUTOLOOP - cout<<"Enter first and last N: ";cin>>n>>limit; + cerr<<"Enter first and last N: ";cin>>n>>limit; n--; cout<<"\n"; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cerr<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << "N = " << n << endl; @@ -175,7 +175,7 @@ } // end of forms loop if (anyfound) { - cout<<"Store newform data? "; cin>>dump; + cerr<<"Store newform data? "; cin>>dump; if(dump) // dump complete data file into (S)NF_DIR/x$N. { nf.output_to_file(1,0); diff -Nru eclib-20190909/progs/point_search.cc eclib-20210625/progs/point_search.cc --- eclib-20190909/progs/point_search.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/point_search.cc 2021-06-25 09:53:34.000000000 +0000 @@ -114,7 +114,7 @@ if(pp) { - bigint index; + long index; vector unsat; if(verbose) { diff -Nru eclib-20190909/progs/qexp.cc eclib-20210625/progs/qexp.cc --- eclib-20190909/progs/qexp.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/qexp.cc 2021-06-25 09:53:34.000000000 +0000 @@ -53,9 +53,9 @@ n=firstn-1; while (n0) { cerr<<"Enter level: "; cin>>n; + while (n>1) { cerr<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { newforms nf(n,verbose); nf.createfromdata(1,25); diff -Nru eclib-20190909/progs/quartic_points.cc eclib-20210625/progs/quartic_points.cc --- eclib-20190909/progs/quartic_points.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/progs/quartic_points.cc 2021-06-25 09:53:34.000000000 +0000 @@ -51,7 +51,7 @@ int main() { - show_version(); + show_version(cerr); cout.precision(10); cin.flags( cin.flags() | ios::dec ); diff -Nru eclib-20190909/README eclib-20210625/README --- eclib-20190909/README 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/README 2021-06-25 09:53:34.000000000 +0000 @@ -24,14 +24,12 @@ FLINT version is found (which must be at least version 2.3, to contain the nmod_mat module) it will be used. If in addition you have the optional FLINT module hmod_mat (which does modular matrix operations -using 32-bit data types) this can be activated as follows; the -advantage being that the modular symbol code will require less RAM to -run: either (i) after ./configure, edit ./Makefile and all */Makefile, -setting FLINT_LEVEL=2 (instead of =1); or (ii) edit configure itself -similarly (in two places) and rerun it; or (iii) append -CXXFLAGS='-DFLINT_LEVEL=2' to the make invocation (and ignore warnings -about FLINT_LEVEL being redefined). To carry out (ii): run -sed -i '/FLINT_LEVEL/s/1/2/' configure +using 32-bit data types) this can be activated by setting the +environment valriable FLINT_LEVEL to 2 before running configure, or +adding "FLINT_LEVEL=2" to the end of the configure invocation. Bother +of these have the effect of adding the compiler flag +"-DFLINT_LEVEL=2$. The advantage of this is that the modular symbol +code will require less RAM to run. (c) Boost is optional (from eclib-2013-09-00) and provides parallel capabilities in the form_finder class. Configure with --with-boost diff -Nru eclib-20190909/tests/checkgens.cc eclib-20210625/tests/checkgens.cc --- eclib-20190909/tests/checkgens.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/checkgens.cc 2021-06-25 09:53:34.000000000 +0000 @@ -84,7 +84,7 @@ // cout<<"After input, C="<> rank; cout << "r = "< -#include +#include int main(void) { diff -Nru eclib-20190909/tests/d2.cc eclib-20210625/tests/d2.cc --- eclib-20190909/tests/d2.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/d2.cc 2021-06-25 09:53:34.000000000 +0000 @@ -35,8 +35,6 @@ #include #include - -bigcomplex roots[4]; int getquartic(quartic& g); // special version for a*x^4+c*x^2+e quartics int main() @@ -73,9 +71,9 @@ long mask=0; - Curvedata E_cd(zero,c,zero,d,zero); + Curvedata E_cd(zero,c,zero,d,zero, 0); cout << "cd-curve (nearer):\t" << (Curve)E_cd << endl; - Curvedata E_cd_dash(zero,cdash,zero,ddash,zero); + Curvedata E_cd_dash(zero,cdash,zero,ddash,zero, 0); cout << "cd-dash-curve (further):\t" << (Curve)E_cd_dash << endl; Point P(&E_cd); Point Q(&E_cd_dash); diff -Nru eclib-20190909/tests/hecketest.cc eclib-20210625/tests/hecketest.cc --- eclib-20190909/tests/hecketest.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/hecketest.cc 2021-06-25 09:53:34.000000000 +0000 @@ -63,7 +63,7 @@ #endif init_time(); start_time(); - int n=1; + int n=2; int plus=1; int verbose=0; cout << "See the hecke matrices (0/1)? "; cin >> verbose; @@ -73,9 +73,9 @@ cout<<"Enter limit on level: ";cin>>limit; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << ">>>Level " << n << "\t"; homspace hplus(n,plus,0,0); @@ -373,7 +373,7 @@ delete[] wqlist; delete[] tplist; } // end of if(genus>0) } // end of if(n) - } // end of while(n>0) or while(n1) or while(n>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { { cout << "\n>>>Level " << n << "\n"; diff -Nru eclib-20190909/tests/in_no_ntl/theight.in eclib-20210625/tests/in_no_ntl/theight.in --- eclib-20190909/tests/in_no_ntl/theight.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_no_ntl/theight.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,6 +1,9 @@ [1,0,0,-9632000,11505156432] [1794 : -732 : 1] [0] +[0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +[11376724821019368394185473144824 : 531128848935479591898724774494856605576120 : 2212245127] +[0] 0 0 0 0 0 [2064 : 19428 : 1] [48378 : -24134 : 27] diff -Nru eclib-20190909/tests/in_no_ntl/tsat3.in eclib-20210625/tests/in_no_ntl/tsat3.in --- eclib-20190909/tests/in_no_ntl/tsat3.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_no_ntl/tsat3.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,3 +1,4 @@ +0 24129 18 1 [0,0,1,-68799,-1969790] 2 [] [-1870:9257:8] [-197:1984:1] 133507 b 2 [1,-1,0,-898,-7905] 2 [2,2] [-178:299:8] [-23748:-59351:1728] [34:-17:1] [-10:5:1] diff -Nru eclib-20190909/tests/in_no_ntl/tsatbnd.in eclib-20210625/tests/in_no_ntl/tsatbnd.in --- eclib-20190909/tests/in_no_ntl/tsatbnd.in 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/in_no_ntl/tsatbnd.in 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,47 @@ +0 +[0,0,1,-7,36] 4 +[1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] + +[1,1,1,-218325338,-1241755642969] +1 +[52725:11541787:1] + +[0, 0, 1, -23737, 960366] +8 +[36 : 390 : 1] +[-87 : 1538 : 1] +[181 : 1610 : 1] +[-159 : 845 : 1] +[-29 : 1274 : 1] +[-11005:192282:125] +[-3021:40175:27] +[10532:78629:64] + +[0, 1, 0, -3532341, 2671895459] +1 +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] + +[0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +12 +[11376724821019368394185473144824 : 531128848935479591898724774494856605576120 : 2212245127] +[7623939119367566734712416 : 221638196641185505905607878680125440 : 6859] +[36426251939262077044010523050021856 : 1440660184888000534262415597113906110443804160 : 7723644690663] +[-2374492566122734660340122 : 529890342210233698629090661148812455 : 2744] +[133315763430614733564506995979036000 : 12052050702684033030644774922369112945461998208 : 13452404189687] +[-736456133932085217609486905120 : 65252742580786613608001616883511206150656 : 281011375] +[-595772851387421768949418976 : 167161309967794524103557005329392387840 : 912673] +[6022489089748785062867974730217810 : 556978335673856277257836463329999151388906387 : 588059226152] +[-14469357974751181338226317055916720 : 4882855888975145618903473912921126613023223376 : 27655941287521] +[401117760561576371833764564008128488352 : 9772673504421360502054799343252140728954874846976 : 98542628343088957] +[289759090016726210750821602762394720 : 4585180501130133566892803635614473034268791168 : 75274392943567] +[147460739409404501162213937304 : 6903716310575347660155145984848699291480 : 143055667] + + +[0,0,0,0,0] diff -Nru eclib-20190909/tests/in_no_ntl/tsat.in eclib-20210625/tests/in_no_ntl/tsat.in --- eclib-20190909/tests/in_no_ntl/tsat.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_no_ntl/tsat.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,3 +1,48 @@ -1 [0,0,1,-7,36] 4 +0 +[0,0,1,-7,36] 4 [1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] -11 +3 30 + + +[1,1,1,-218325338,-1241755642969] +1 +[52725:11541787:1] +1 -1 + + +[0, 0, 1, -23737, 960366] +8 +[36 : 390 : 1] +[-87 : 1538 : 1] +[181 : 1610 : 1] +[-159 : 845 : 1] +[-29 : 1274 : 1] +[-11005:192282:125] +[-3021:40175:27] +[10532:78629:64] +1 -1 + + +[0, 1, 0, -3532341, 2671895459] +1 +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] +3 3 + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] +1 200 + +[0,0,0,0,0] + + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] +1 86682 diff -Nru eclib-20190909/tests/in_ntl/theight.in eclib-20210625/tests/in_ntl/theight.in --- eclib-20190909/tests/in_ntl/theight.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_ntl/theight.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,14 +1,21 @@ [1,0,0,-9632000,11505156432] [1794 : -732 : 1] [0] +[0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +[11376724821019368394185473144824 : 531128848935479591898724774494856605576120 : 2212245127] +[0] 0 0 0 0 0 -[2064 : 19428 : 1] -[48378 : -24134 : 27] - [1,0,0,-3369862725,-75295331208511] [-43224687030631190 : 21612343876713899 : 1289689904125] [0] + + + +[2064 : 19428 : 1] +[48378 : -24134 : 27] + + 0 0 0 0 0 0 0 0 0 0 diff -Nru eclib-20190909/tests/in_ntl/tsat3.in eclib-20210625/tests/in_ntl/tsat3.in --- eclib-20190909/tests/in_ntl/tsat3.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_ntl/tsat3.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,3 +1,4 @@ +0 24129 18 1 [0,0,1,-68799,-1969790] 2 [] [-1870:9257:8] [-197:1984:1] 133507 b 2 [1,-1,0,-898,-7905] 2 [2,2] [-178:299:8] [-23748:-59351:1728] [34:-17:1] [-10:5:1] diff -Nru eclib-20190909/tests/in_ntl/tsatbnd.in eclib-20210625/tests/in_ntl/tsatbnd.in --- eclib-20190909/tests/in_ntl/tsatbnd.in 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/in_ntl/tsatbnd.in 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,47 @@ +0 +[0,0,1,-7,36] 4 +[1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] + +[1,1,1,-218325338,-1241755642969] +1 +[52725:11541787:1] + +[0, 0, 1, -23737, 960366] +8 +[36 : 390 : 1] +[-87 : 1538 : 1] +[181 : 1610 : 1] +[-159 : 845 : 1] +[-29 : 1274 : 1] +[-11005:192282:125] +[-3021:40175:27] +[10532:78629:64] + +[0, 1, 0, -3532341, 2671895459] +1 +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] + +[0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +12 +[11376724821019368394185473144824 : 531128848935479591898724774494856605576120 : 2212245127] +[7623939119367566734712416 : 221638196641185505905607878680125440 : 6859] +[36426251939262077044010523050021856 : 1440660184888000534262415597113906110443804160 : 7723644690663] +[-2374492566122734660340122 : 529890342210233698629090661148812455 : 2744] +[133315763430614733564506995979036000 : 12052050702684033030644774922369112945461998208 : 13452404189687] +[-736456133932085217609486905120 : 65252742580786613608001616883511206150656 : 281011375] +[-595772851387421768949418976 : 167161309967794524103557005329392387840 : 912673] +[6022489089748785062867974730217810 : 556978335673856277257836463329999151388906387 : 588059226152] +[-14469357974751181338226317055916720 : 4882855888975145618903473912921126613023223376 : 27655941287521] +[401117760561576371833764564008128488352 : 9772673504421360502054799343252140728954874846976 : 98542628343088957] +[289759090016726210750821602762394720 : 4585180501130133566892803635614473034268791168 : 75274392943567] +[147460739409404501162213937304 : 6903716310575347660155145984848699291480 : 143055667] + + +[0,0,0,0,0] diff -Nru eclib-20190909/tests/in_ntl/tsat.in eclib-20210625/tests/in_ntl/tsat.in --- eclib-20190909/tests/in_ntl/tsat.in 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/in_ntl/tsat.in 2021-06-25 09:53:34.000000000 +0000 @@ -1,3 +1,52 @@ -1 [0,0,1,-7,36] 4 +0 +[0,0,1,-7,36] 4 [1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] -11 +3 30 + +[0,1,1,-5203683874,-144483976270257] +1 +[2168251995411655778450807625109071458038066424045439264804487113928192266016020816172218469959472732741510882314178322295331571822203868759614460527408393291040333261244844673953396751473422476995056323999281244426790658741733680090138250308642118792275475439143640175842859841861264637794519698266643177065819124073183662609282196450269581232530177580634465414842216528373420323470390660256872979658885631514035518348207869636806327533508766676916684354545201633207996298998579901677851243624161746589199279061505874565140912014693702028364739260393363418410011798145756316894322963444249147617189658773074116491868653410041586711402977569904300351653936563902996379791449084233231227444059282985855021708597859154178410390445730153459861205321644159930738153044138358534665941126919788270822023659547507189517953043121524084072826640534204404300472862720958811506286038768947221129351368146095020133206527850215213950359031199486169574626580562846695046144828938927639571527184357435976547650233355430910696272506250710136450456894613228631694103703933128788483928479939687032487589013851132850684009952593048445016939728828366898294158020628858754314743175045687398921901306570682458345426806628575823818801710206865420359781674525597354384674535648163829019093957749883277798097159017005089757478115510067535309286959737817694716226665304123810921822327337505528034993000293784222380300988272288056564997643480032615147394559721279318718817658651213353867153113663308446804249733068918074852208587161776863336775478249305395428139272514254338938661523728115109079983135497074135741902177177999604848710924039842168027670793487422571666903905642786384352531734076733827122457553483648925141026837037509914027412169473693596906535856646397352311187868483922299889317614661572418967877218341775885698055825924594384826053641479194295243865238745227804689351553427105421391182502920232922502107626301181580631476235655118267512131848224089397881897391106797316846696863657121327359364921363885951494291129789263590516609433357442753979175746253392335248115963358563519225104124856975885085451153634415758609794618675169641380964085177770283733146557710513935065334084:364654369939587648906030762497183160109799932520650058473363052219001308473384490911706405327718697981247451098615982520199645970933830586030154221168571970479695728142576529636749368000968999430831418040633283507293148166400111964336132329693370563941243608304103118635763763871473320114434276900544107964277568511975569658271003516219748148962844792223712916904487152552673353199810409466086477926873859617492908007285811437488882628561671691938468841363705905046933159244012880659388085232633048536202972626384696337309510755341270174064849639232837560473077424191232713145537795992525229024094819288602358958183748275795826931290827850214181121003836714105128411417440027360841694561297046489151577185815004853653631309769452368745405178134574583216805407905563485825129714243040090535269494424068589987051547149416660798406980488525645025986822101607825558083463402728332177661751209357299930496711314336935733168117194205776152965289683798092995859473722642449236990940585291388058223677341808671604826854635264579205902337879123696848135422385086381954572327211150858524979066980117300089224757572813696508036079332096754879164681400594143712362513751637672178645631852441401005600560911657194060598416805555184766414632445213502160447629146507421544326076124685348273636380749382590469323037537456798790010911484256990362805352466003316143078595248039148429507096280144630620875465771714123525979480680262191956249492812343264974653172764673582375973200128237268233497010078416360077157636217916142154902156819759441964369767958125349092784887195111965076637610415036710299856528153841184036406257551853851922646605007420623465848209535215803147916346137362582569449990535986732389047591523922915380971466539014735487552659653072536572946791807698597843296032353968427432951509410199484240933117920377862676413312501322519112790523947235328179692810649587946704912790592260617330237158584048655547875279955969751372773326857438357176395050456576464438439737011718767378163589134288534627690726556343761315341705359551358313620563682865101664670378036299702780398110693067880348806438123817052382898219452382009080152124622107344593030316661775018429035194563637:22317970971443875510611416101670014063668929622831105713401848353385316357833502476650169666238609506087380683653752861251316718941551021529634676318722856804562481981038783704965926981894188040424793490282253199818654113403299652411766586893637130844237556802191193881748289829318453568155519369817072879478501421977458952245825208377187676830481519728613877718488541152862443312019160701652096030025286262868295333293751809263461353455807780736830633364090387805457788263561273442847931501904840605662223721447538164697728515638037749354408496834998174519425164118860754125696257929015927953548312475428447961050159177374010733123196007769087605301025246657294061092368609497376968037727428713097507568320128441337346419127591378252085508742928012408809501754062842882357521616608671649298326924215970513443763734062770550920194398575831413358255150966255520164344717795011990002273655966510824703682564440820960177925281111050129305897235397125605146890531611594301654186908799443341871309270068544156774169133478879354536191604826212655718599503438362386780457393969122515706195169781384450157732458404828323791884576526004489890287644901077681404407444887681900211255249512230135643352114304013678172359997357266565904381267131107054586136520020807774895620583325622322681098811178059391982810861776666746192636631001776990384773431454306089061617574732768003979548756136864641554986647906209140690447324944012868613604026983320395301550962373816762107139737362463100989048640283782005683054645760529775838499173716253816568567111603337493700682263305947769200140004766794916642737838354166541364524503235736628923596537336119435817755486308384581248453905226595195854109627329816846782215641144505332763667376790836435296624214901500770801446403123588601822008055568995437059758200758821882232217656317711713252479536512494090275474267650910103053541521776292425133116980377726105030951104026007449281506890788218298119670232955279031318796075303045843728647357475338352902001496140017154422025945974039589898173587384356313154052740510594785527806175232165610851643753950815807169507656504384856287060143893491226759270952136509949484652111617488637731392] +1 -1 + +[1,1,1,-218325338,-1241755642969] +1 +[52725:11541787:1] +1 -1 + + +[0, 0, 1, -23737, 960366] +8 +[36 : 390 : 1] +[-87 : 1538 : 1] +[181 : 1610 : 1] +[-159 : 845 : 1] +[-29 : 1274 : 1] +[-11005:192282:125] +[-3021:40175:27] +[10532:78629:64] +1 -1 + + +[0, 1, 0, -3532341, 2671895459] +1 +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] +3 3 + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] +1 200 + +[0,0,0,0,0] + + +[0,1,1,-9872,374262] +4 +[57:0:1] +[56:13:1] +[458:19:8] +[36:-259:1] +1 86682 diff -Nru eclib-20190909/tests/Makefile.am eclib-20210625/tests/Makefile.am --- eclib-20190909/tests/Makefile.am 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/Makefile.am 2021-06-25 09:53:34.000000000 +0000 @@ -17,11 +17,11 @@ AM_LDFLAGS = $(FLINT_LDFLAGS) $(NTL_LDFLAGS) $(PARI_LDFLAGS) $(LDFLAGS_BOOST) $(PTHREAD_CFLAGS) $(PTHREAD_LDFLAGS) LIBS = $(top_builddir)/libsrc/libec.la $(FLINT_LIBS) $(PARI_LIBS) $(NTL_LIBS) $(BOOST_LIBS) $(PTHREAD_LIBS) -check_run = echo "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(test_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? +check_run = echo -n "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(test_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && echo "$${prog} completed" && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? ################ PROCS ############################################# -PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace thilbert tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert timing threading +PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace thilbert tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert timing threading tversion PROCS_TESTS_SUFFIXED = $(PROCS_TESTS:=$(EXEEXT)) procs_tests: $(PROCS_TESTS_SUFFIXED) @@ -58,6 +58,7 @@ tlegcert_SOURCES=tlegcert.cc timing_SOURCES=timing.cc threading_SOURCES=threading.cc +tversion_SOURCES=tversion.cc check_procs: procs_tests @echo Running procs checks... @@ -65,7 +66,7 @@ ################ QCURVES ############################################# -QCURVES_TESTS = tcurve tpoints theight thtconst tegr telog tdivpol tperiods tsat tsat2 tsat3 conductor tate torsion twist allisog checkgens +QCURVES_TESTS = tcurve tpoints theight thtconst tlatconst tegr telog tdivpol tperiods tsatbnd tsat tsat2 tsat3 conductor tate torsion twist allisog checkgens QCURVES_TESTS_SUFFIXED = $(QCURVES_TESTS:=$(EXEEXT)) qcurves_tests: $(QCURVES_TESTS_SUFFIXED) @@ -73,10 +74,12 @@ tpoints_SOURCES=tpoints.cc theight_SOURCES=theight.cc thtconst_SOURCES=thtconst.cc +tlatconst_SOURCES=tlatconst.cc tegr_SOURCES=tegr.cc telog_SOURCES=telog.cc tdivpol_SOURCES=tdivpol.cc tperiods_SOURCES=tperiods.cc +tsatbnd_SOURCES=tsatbnd.cc tsat_SOURCES=tsat.cc tsat2_SOURCES=tsat2.cc tsat3_SOURCES=tsat3.cc diff -Nru eclib-20190909/tests/modtest.cc eclib-20210625/tests/modtest.cc --- eclib-20190909/tests/modtest.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/modtest.cc 2021-06-25 09:53:34.000000000 +0000 @@ -41,9 +41,9 @@ cout<<"Enter first and last levels: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << ">>>Level " << n << "\t"; symbdata symbols(n); diff -Nru eclib-20190909/tests/nftest.cc eclib-20210625/tests/nftest.cc --- eclib-20190909/tests/nftest.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/nftest.cc 2021-06-25 09:53:34.000000000 +0000 @@ -36,7 +36,7 @@ int main(void) { - int limit,firstn,n=1,count=0; + int limit,firstn,n=2,count=0; int verbose=1; #ifdef AUTOLOOP cerr<<"Enter first and last N: ";cin>>firstn>>limit; @@ -44,9 +44,9 @@ while (n0) { cerr<<"Enter level: "; cin>>n; + while (n>1) { cerr<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << ">>> Level " << n << " <<<\t"; newforms nf(n,verbose); diff -Nru eclib-20190909/tests/oftest.cc eclib-20210625/tests/oftest.cc --- eclib-20190909/tests/oftest.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/oftest.cc 2021-06-25 09:53:34.000000000 +0000 @@ -39,7 +39,7 @@ while (n>n, n>0) + while (cout<<"Enter level: ", cin>>n, n>1) { #endif cout << ">>>Level " << n << "\t"; diff -Nru eclib-20190909/tests/out_no_ntl/allisog.out eclib-20210625/tests/out_no_ntl/allisog.out --- eclib-20190909/tests/out_no_ntl/allisog.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/allisog.out 2021-06-25 09:53:34.000000000 +0000 @@ -4,10 +4,10 @@ [ [1,0,1,4,-6] [1,0,1,-36,-70] [1,0,1,-1,0] [1,0,1,-171,-874] [1,0,1,-11,12] [1,0,1,-2731,-55146] ] [0,2,3,3,0,0;2,0,0,0,3,3;3,0,0,0,2,0;3,0,0,0,0,2;0,3,2,0,0,0;0,3,0,2,0,0] -[ [1,1,1,-10,-10] [1,1,1,-5,2] [1,1,1,35,-28] [1,1,1,-135,-660] [1,1,1,-80,242] [1,1,1,0,0] [1,1,1,-110,-880] [1,1,1,-2160,-39540] ] -[0,2,2,2,0,0,0,0;2,0,0,0,2,2,0,0;2,0,0,0,0,0,0,0;2,0,0,0,0,0,2,2;0,2,0,0,0,0,0,0;0,2,0,0,0,0,0,0;0,0,0,2,0,0,0,0;0,0,0,2,0,0,0,0] +[ [1,1,1,-10,-10] [1,1,1,35,-28] [1,1,1,-135,-660] [1,1,1,-5,2] [1,1,1,-110,-880] [1,1,1,-2160,-39540] [1,1,1,-80,242] [1,1,1,0,0] ] +[0,2,2,2,0,0,0,0;2,0,0,0,0,0,0,0;2,0,0,0,2,2,0,0;2,0,0,0,0,0,2,2;0,0,2,0,0,0,0,0;0,0,2,0,0,0,0,0;0,0,0,2,0,0,0,0;0,0,0,2,0,0,0,0] -[ [1,-1,1,-1,-14] [1,-1,1,-6,-4] [1,-1,1,-1,0] [1,-1,1,-91,-310] ] +[ [1,-1,1,-1,-14] [1,-1,1,-6,-4] [1,-1,1,-91,-310] [1,-1,1,-1,0] ] [0,2,0,0;2,0,2,2;0,2,0,0;0,2,0,0] [ [0,1,1,-9,-15] [0,1,1,1,0] [0,1,1,-769,-8470] ] @@ -16,8 +16,8 @@ [ [0,1,0,4,4] [0,1,0,-1,0] [0,1,0,-36,-140] [0,1,0,-41,-116] ] [0,2,3,0;2,0,0,3;3,0,0,2;0,3,2,0] -[ [1,0,0,-4,-1] [1,0,0,-39,90] [1,0,0,1,0] [1,0,0,-49,-136] [1,0,0,-34,-217] [1,0,0,-784,-8515] ] -[0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] +[ [1,0,0,-4,-1] [1,0,0,-39,90] [1,0,0,-49,-136] [1,0,0,1,0] [1,0,0,-34,-217] [1,0,0,-784,-8515] ] +[0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,2,2;2,0,0,0,0,0;0,0,2,0,0,0;0,0,2,0,0,0] [ [0,-1,0,-4,4] [0,-1,0,-64,220] [0,-1,0,1,0] [0,-1,0,-24,-36] [0,-1,0,16,-180] [0,-1,0,-384,-2772] ] [0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] diff -Nru eclib-20190909/tests/out_no_ntl/smattest.out eclib-20210625/tests/out_no_ntl/smattest.out --- eclib-20190909/tests/out_no_ntl/smattest.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/smattest.out 2021-06-25 09:53:34.000000000 +0000 @@ -2231,6 +2231,6 @@ done rank using echmodp : 95 number of non-zero entries: 525 rank is:95 - number of non-zero entries: 434 + number of non-zero entries: 427 kernel correct enter new value of t diff -Nru eclib-20190909/tests/out_no_ntl/tdivpol.out eclib-20210625/tests/out_no_ntl/tdivpol.out --- eclib-20190909/tests/out_no_ntl/tdivpol.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tdivpol.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,7 +1,87 @@ Curve [0,0,1,-7,6] -Division Poly (2) = [ 25 -28 0 4 ] -Division Poly (3) = [ -49 75 -42 0 3 ] -Division Poly (5) = [ 155774 -406875 380975 -219125 224875 -213150 93525 -10500 -5145 2375 -434 0 5 ] -Division Poly (7) = [ -18468518451 129897313175 -445857037878 932404235875 -1243400007052 1026876435550 -437452731142 -17749822300 107968849198 -15732678675 -41963963776 32734719500 -10597551734 1215763500 204773548 -134374100 71781619 -28348950 5133611 4900 -144746 24650 -2156 0 7 ] -Division Poly (9) = [ 184160099143680751 -1745915691101562000 7553596765573730970 -20009912719373528175 37942026581120864697 -60375121456041861525 93410183300843035368 -141970066026214424625 190405429869508518294 -205725048911535979875 170148544422339746088 -101903285497398603750 37479654863464097844 -301195540341584325 -10122360365346701220 7022704801725188100 -2024994639983255253 -378932954398234425 638476088702667243 -278350695029482875 46649147045567535 8235437040258750 -4808056523794875 -19863562351500 413123504333085 -21629335715325 -61645404898854 25482225972000 -4079567512557 -51564996000 145726971768 -34704720000 6686917839 -1118177550 97716879 3647700 -1573194 142650 -7308 0 9 ] -Division Poly (11) = [ -54041658613892771450681999 880907080312611332584912000 -7219594509378023629107644470 38958100184313046991444736425 -152640690458238768754008318817 454785460748010763365906132375 -1056137061172539849022036113531 1936054859688651591523350738175 -2810594691494082952472648616520 3208473937931657698860198494875 -2822039231599463382188559156202 1848423918012109590080578699875 -912617258569632579061077286483 560913385968977938523311946800 -817656871503167956435977465356 1249509868334450532408690045625 -1414165966153163021643340433938 1199336430865617781090316458650 -784676191760539643225675692205 396756309706661409373382542875 -144956275362751028758501833067 23355448732213310557101714875 17220044440091899138064455473 -20247521386823417986151910750 11805434554239601412412797599 -4040005394287265921365582350 234083284571165543297755125 642823838857235347992405825 -419159192063093806076371388 127589838582618892736949000 -6470559713355987866471481 -12226425861215930742609000 5613930837990861266425006 -822808169809586975048075 -285218373979309991270589 186775240363627878171825 -38115245033833256003913 -4184634313923610398775 4784966662201425769762 -1316603611701382184125 126856023732928120092 24162795683139180375 -9281076375640161037 1097831192157003150 -100276466219262732 63186211155991825 -25032991453137052 4693816276634100 -310935739698815 -50338154356875 15290737879263 -2102529532125 227429915559 -21041940150 1025882033 51025100 -10176859 580525 -19558 0 11 ] + +Division polynomials: + +Division Poly (2) = [25 -28 0 4] +Division Poly (3) = [-49 75 -42 0 3] +Division Poly (4) = [61 350 -490 250 -70 0 2] +Division Poly (5) = [155774 -406875 380975 -219125 224875 -213150 93525 -10500 -5145 2375 -434 0 5] +Division Poly (6) = [-7450597 33433150 -55698846 38175900 2995139 -22858500 16502416 -7083900 3172008 -1401400 336784 0 -17836 4200 -504 0 3] +Division Poly (7) = [-18468518451 129897313175 -445857037878 932404235875 -1243400007052 1026876435550 -437452731142 -17749822300 107968849198 -15732678675 -41963963776 32734719500 -10597551734 1215763500 204773548 -134374100 71781619 -28348950 5133611 4900 -144746 24650 -2156 0 7] +Division Poly (8) = [-2571419770853 1215506524050 67371048936842 -320148770148050 780063910616298 -1249129857057600 1423544884020198 -1160552647602600 621047252595462 -133390086758000 -94508756302632 102557214742500 -42735421158370 6650264571300 470955582384 859919970900 -1163784258588 520062744600 -101339901340 -2100672000 5910589524 -1768634400 442778784 -97461000 11262114 409500 -266364 31300 -2044 0 4] +Division Poly (9) = [184160099143680751 -1745915691101562000 7553596765573730970 -20009912719373528175 37942026581120864697 -60375121456041861525 93410183300843035368 -141970066026214424625 190405429869508518294 -205725048911535979875 170148544422339746088 -101903285497398603750 37479654863464097844 -301195540341584325 -10122360365346701220 7022704801725188100 -2024994639983255253 -378932954398234425 638476088702667243 -278350695029482875 46649147045567535 8235437040258750 -4808056523794875 -19863562351500 413123504333085 -21629335715325 -61645404898854 25482225972000 -4079567512557 -51564996000 145726971768 -34704720000 6686917839 -1118177550 97716879 3647700 -1573194 142650 -7308 0 9] +Division Poly (10) = [413009374512445941380 -5577533221799587495650 34236508339578868067654 -126719683386541187863300 312994894498933292419431 -530641300710685283735000 585897029187423197307976 -280834885094634332916300 -367204662156668126267015 1082254486519067947850050 -1554831039561822593605650 1672867489720306188031100 -1511763332284285767508693 1186278164953699558211100 -786873604739812654099112 405920703060332401917500 -130861468159990009717737 -5601080695755881466900 37964990852501696833520 -25524121253263387893600 8897497566342411821410 -784837740659180354300 -925670621559347454588 522167496232044339600 -83452626309791455327 -45657452461518723000 34482142926904321488 -10360740343811041800 1058457111228061160 328746903184114800 -137359646628361520 17449112283988000 -1181088726955137 1434498958414150 -782923178241638 188460706507500 -17341433546593 -2258719474900 951528824400 -162366029100 21994486360 -2572647000 159807824 8131200 -2124444 149000 -6104 0 5] +Division Poly (11) = [-54041658613892771450681999 880907080312611332584912000 -7219594509378023629107644470 38958100184313046991444736425 -152640690458238768754008318817 454785460748010763365906132375 -1056137061172539849022036113531 1936054859688651591523350738175 -2810594691494082952472648616520 3208473937931657698860198494875 -2822039231599463382188559156202 1848423918012109590080578699875 -912617258569632579061077286483 560913385968977938523311946800 -817656871503167956435977465356 1249509868334450532408690045625 -1414165966153163021643340433938 1199336430865617781090316458650 -784676191760539643225675692205 396756309706661409373382542875 -144956275362751028758501833067 23355448732213310557101714875 17220044440091899138064455473 -20247521386823417986151910750 11805434554239601412412797599 -4040005394287265921365582350 234083284571165543297755125 642823838857235347992405825 -419159192063093806076371388 127589838582618892736949000 -6470559713355987866471481 -12226425861215930742609000 5613930837990861266425006 -822808169809586975048075 -285218373979309991270589 186775240363627878171825 -38115245033833256003913 -4184634313923610398775 4784966662201425769762 -1316603611701382184125 126856023732928120092 24162795683139180375 -9281076375640161037 1097831192157003150 -100276466219262732 63186211155991825 -25032991453137052 4693816276634100 -310935739698815 -50338154356875 15290737879263 -2102529532125 227429915559 -21041940150 1025882033 51025100 -10176859 580525 -19558 0 11] + +Multiplication-by-n maps (x coordinate): + +n = 2: +Numerator: [49 -50 14 0 1] +Denominator: [25 -28 0 4] +n = 3: +Numerator: [-1525 -4641 14700 -10473 1050 1470 -600 84 0 1] +Denominator: [2401 -7350 9741 -6300 1470 450 -252 0 9] +n = 5: +Numerator: [11362160425 25747089400 -441542258500 1506059616215 -2610427772875 2620690440081 -1387765627500 -5048462735 622380767750 -514545267425 213273944550 -37895439750 -6392442000 5509239565 -1991083500 805974932 -259821875 26485165 8844500 -2116075 -204050 110250 -13000 700 0 1] +Denominator: [24265539076 -126761092500 284239264925 -378286361750 393514275875 -416360781200 421947611075 -340338334000 222184587415 -139925348500 86109315418 -40174487500 9539139565 1483576500 -2055966500 735111700 -102334925 -17456250 11041735 -2166500 136906 23750 -4340 0 25] +n = 7: +Numerator: [-478965310761451231025 3253200126164286188149 493504842253691880150 -87437670391256256814141 481053400926406685558475 -1474524847437726457036608 3051293047895397342722300 -4507790169717305498341981 4708354723086060377511600 -3031718411072855187719700 100320809977898287428700 2584762647056569539994518 -3803952756150941424717400 3428800794002557340072846 -2220821754300618338952600 1043523046720703474603804 -312300468078508586572175 1442623950439048333404 74652464685011903431000 -62420322870375191780779 32723404759644607191750 -10817148832748217403500 983621853556791774500 1094908222340954435400 -597643354403853229500 85498396077199034566 40785097726864444800 -20343885839157086724 223835554725509900 2681079531989243980 -1026461532749354800 119137846302349868 37877316216756800 -18977605618891227 3304306659173450 8701877287670 -135764897535400 34412538727721 -5354282777900 727182801268 -86238689250 4295207210 519821400 -43847846 -10392900 1754788 -98000 2744 0 1] +Denominator: [341086173774927439401 -4798021850215625783850 33341949831200126354581 -150271512229128794144550 486949620236074001282038 -1192396394453621322632800 2261070134715425544591521 -3347375281558187150583900 3842454854008922612126960 -3324943281677884470444750 2010418069392193707136282 -651020404345562013303800 -96608621157166208197954 166151917069487225505300 48699725372809023988580 -178444916497903457931200 144560299534716328862298 -54814088180206102522950 961202166802238932207 8616789704135225396700 -2291677169592145859020 -1813626803872896374350 1838081104627613478024 -798819036672743394000 191378585118824669566 -10013444688503331600 -15500999700626997900 10243440676476617400 -4123480548928793500 1066016998482282000 -119062576319787996 -30000425318197600 19749888363614829 -6463294466493550 1585109901891446 -246150026516100 -2360054651479 12392379246100 -3190374052068 372027946500 61786550 -7553991900 1303637806 -106222200 2621892 345100 -30184 0 49] + +Testing division of points: + +P = [0:2:1] +2*P = [245:-32:125], divided by 2 gives back P, OK +3*P = [-74725:-438957:117649], divided by 3 gives back P, OK +5*P = [1769929178043950:4738372533007263:3779940084024824], divided by 5 gives back P, OK +7*P = [-8845779679186810919721876142275:-26132116500093837448172183040908:6299356293743239735763552887851], divided by 7 gives back P, OK +11*P = [-345907035865394112110113258379175841526681422618969349065465631483788171611500:-603899496397932670693901238084339680074376067505653656300679516648438378729902:157828710767928051843902784106074829349824572090398507020120360018086980045999], divided by 11 gives back P, OK +13*P = [4330944971498881477952763040195461194737358561970732874089910688931368534665435456142865934677314444316324525:474166894211156940132146040087902301358254640922900664396468316978550001533595729712356829915629891398826393:4459345156448775844130923624171028485455804112741895938417180204973106756635206294993276819983272953020126899], divided by 13 gives back P, OK + +P = [1:0:1] +2*P = [14:51:1], divided by 2 gives back P, OK +3*P = [858:3056:2197], divided by 3 gives back P, OK +5*P = [-13422227300:37155830557:12167000000], divided by 5 gives back P, OK +7*P = [-654363158444498413938:323334584599779613133:232135196336821724283], divided by 7 gives back P, OK +11*P = [-5386909266611602426586636855741750187975628118240481:-31903410988726312174342705633718553251007282422752800:8563273080452283301577237101778658433493825993941319], divided by 11 gives back P, OK +13*P = [6790601027182872441717735378318194615000557734419531444518829576329287422:-21346190491686533430108554189028709484678265994449397859310470032693638296:10895308449429756233096859998848382387567744114034063749875541435853032123], divided by 13 gives back P, OK + +P = [2:0:1] +2*P = [21:-96:1], divided by 2 gives back P, OK +3*P = [17347:11477:6859], divided by 3 gives back P, OK +5*P = [1314368321100:2192807253559:296474109632], divided by 5 gives back P, OK +7*P = [787735371750610845962493:2815013979731975184348416:58266402897702006018621], divided by 7 gives back P, OK +11*P = [465224049592215941888315944477150086362582688911509781121082:-2835041364493288591742476527691666698801289699650164214285000:12520837463201904227545769580855021289721316529527142889041], divided by 11 gives back P, OK +13*P = [967652288848675141165417507105084877050922452157366640667361749659468531276841232963:-2467719925245805762134421012865078764322728240276925184295644784012954762439103997267:137922062795787281492160592505828749775362042044145821626654801172360654848016552211], divided by 13 gives back P, OK + +P = [3:3:1] +2*P = [742:-552:343], divided by 2 gives back P, OK +3*P = [1735612:-8697671:68921], divided by 3 gives back P, OK +5*P = [13274790938560307650:-3810346189413166609:6816655498982663368], divided by 5 gives back P, OK +7*P = [15610084384521543609511648390658094288:68045384727563741553482631637942786750:797803639727363681600463977477765079], divided by 7 gives back P, OK +11*P = [1575803501107696145915932812044229184495312851311623153876318357968752759104183973347056429397:1396274583140038254949640133020198974959304566276876829967194082976845151053935966087848230097:557829383989248411534035078306591098535924517768571182260197731835239742103251080379853060699], divided by 11 gives back P, OK +13*P = [6161146492714921360750727810183946205467564656490939099032408800798722540272737508766984883606134682101989119243397164919137164312:-35721620630687298226865205673450160556524720425884654664577788075243215491371022249911678723584335179331885213925899777407539593821:183117292199220258281649737393844871119425437622572982949683718143218212229910662967343636339932171621634631574337220088031542071], divided by 13 gives back P, OK + +P = [-1:-4:1] +2*P = [798:377:343], divided by 2 gives back P, OK +3*P = [4430992:-438330:4330747], divided by 3 gives back P, OK +5*P = [-12221903491172643150:11468039763290751651:4885740073494125000], divided by 5 gives back P, OK +7*P = [17650003281779675566729443347938708188:-192526580513012204672730365490691444763:72980796628288414077404408180857060533], divided by 7 gives back P, OK +11*P = [-30613130525745975806945896359562605604200966296242976777041809153479858248968536822155766662519:-15714745521957622294462788054133735354109125384042241494977265337200555303010618130240791627276:10342901057480405091454441780213283779071882904636290875244915407676321355926935920245292819619], divided by 11 gives back P, OK +13*P = [1405907707042133954154238850941035663903445083801514062880744416997628088406667394648913262927105511332783388554595372344393472664228:-2211226265150483927592113283252013630287688089685314399591313107761425853236835065390795882450722392047791605464694483959070884011570:1600088061666351860094194147994818358340122989198013456481419612192269188713359699781782586135291445838482977423277673449499162776373], divided by 13 gives back P, OK + +P = [-3:-1:1] +2*P = [406:8180:1], divided by 2 gives back P, OK +3*P = [-198562138:-133849341:68417929], divided by 3 gives back P, OK +5*P = [-868891893753069223266400:-892775925650647678206441:320035512450753499922432], divided by 5 gives back P, OK +7*P = [-250789195524699438713028256143149165935010703462:-351763092836663361098186249071565146814058578612:102208756706176009076316662108042042887248607671], divided by 7 gives back P, OK +11*P = [-5888498972561699214345998647776423563516419612163855732932875428098479096816453556740071283543529303920465099353451197:-13533256227761692733082484218341561251156460176136586962103570474399526108120718796397535148131526130064613929899679999:3291138473665024086163024275753883782780254080619125033356991189541952502966715638923169363573135424125729714408703999], divided by 11 gives back P, OK +13*P = [-471304787040968158056679651141156035898503824031997613220205307381493602197020538234554557851623914285000405516091920163285632114952834039661937557168333773226984038:-1370873330960135587145910098464877803541908169825891341967548989668552498702749973686005785221486327913645312167741302000549449734377969308776534759994492228417393091:330212063553055881533947376167502836269069675579486301004644611488773223934819786676041306852236930427317775633620010841259816717836527910178288832111727833861202679], divided by 13 gives back P, OK + +P = [4:-7:1] +2*P = [4277:-1045:2197], divided by 2 gives back P, OK +3*P = [173402493:270630132:41781923], divided by 3 gives back P, OK +5*P = [347958005352980994267950:-591491125266464506985649:90144087121871684875000], divided by 5 gives back P, OK +7*P = [28346791926960812679644342662875487909944722853:46007717633420125671884939882166416087274190645:6574733970234508106612925608541549400717628583], divided by 7 gives back P, OK +11*P = [17474145883556647766828376232602106710826303890390986982624317936592550275465510611644786949719563721070184568269144:29480256355813074498457852565032175239305961624890346125612405835647274977712834264461974502384623321822021473979573:3896217090865641720447450673233504443391236048556578877575563503584301366068007409294978657913670393568854035781361], divided by 11 gives back P, OK +13*P = [141214430924449205970890907019814623022662416842585435331280731630294938794541398360467356587791564443343502605886099748817931388768459086946049432514093725256267:-226503185172742643796701194535524557733787205454975272078361208779360866680687110556127834139290657225066635029141642546627353273657327903648741011104842867737892:39145148418716729635148349998510974266838033447983885103993474847107471829372688807853030441396426545342852451854525365130399276623238448918996402000657968479137], divided by 13 gives back P, OK diff -Nru eclib-20190909/tests/out_no_ntl/theight.out eclib-20210625/tests/out_no_ntl/theight.out --- eclib-20190909/tests/out_no_ntl/theight.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/theight.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,12 +1,6 @@ Computed 78519 primes, largest is 1000253 Extra primes in list: -Input a curve: Curve [1,0,0,-9632000,11505156432] -b2 = 1 b4 = -19264000 b6 = 46020625728 b8 = -92763918843568 -c4 = 462336001 c6 = -9941148661249 -disc = 1806000 (# real components = 2) -#torsion not yet computed - -Input a point on curve, [0] to finish: +Curve [1,0,0,-9632000,11505156432] Point [1794:-732:1] has infinite order Local heights: Sum so far = 0 @@ -21,8 +15,41 @@ Sum of local heights: 1.09254 global height of [1794:-732:1] is 1.09254 -Input a point on curve, [0] to finish: -Input a curve: +Curve [0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +Input curve is not minimal at [ 2 ] +Heights will be computed after mapping points to the minimal model [1,0,0,-1209873315556653510389989204544209972082084,331058311839965956052748107957148273288865814054655695750098704] +Point [11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] has infinite order +Local heights: +1303: 14.3448 +Sum so far = 14.3448 +log(den(x(P))) = 14.3448 +2: -0.649825 +3: -3.20429 +7: -1.94591 +13: -2.56495 +29: -1.68365 +31: -2.57549 +43: -1.8806 +73: 0 +79: -3.27709 +83: 0 +89: 0 +151: 0 +199: -2.64665 +239: 0 +263: 0 +601: -6.39859 +617: 0 +1433: 0 +3449: -4.07292 +6199: -4.36607 +1607849: -7.1452 +Sum so far = -28.0664 +R: 48.7913 + +Sum of local heights: 20.725 +global height of [11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] is 20.725 + Testing points on the curve [0,0,1,-7,6] The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] diff -Nru eclib-20190909/tests/out_no_ntl/tlatconst.out eclib-20210625/tests/out_no_ntl/tlatconst.out --- eclib-20190909/tests/out_no_ntl/tlatconst.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tlatconst.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,50 @@ +Table of Gamma values +--------------------- + +n Gamma(n) Gamma(n+1/2) +1 1 0.886227 +2 1 1.32934 +3 2 3.32335 +4 6 11.6317 +5 24 52.3428 +6 120 287.885 +7 720 1871.25 +8 5040 14034.4 +9 40320 119292 +10 362880 1.13328e+06 +11 3.6288e+06 1.18994e+07 +12 3.99168e+07 1.36843e+08 +13 4.79002e+08 1.71054e+09 +14 6.22702e+09 2.30923e+10 +15 8.71783e+10 3.34839e+11 +16 1.30767e+12 2.22909e+22 +17 2.09228e+13 3.67799e+23 +18 3.55687e+14 6.43649e+24 +19 6.40237e+15 1.19075e+26 +20 1.21645e+17 2.32196e+27 + + +Table of Lattice constants +-------------------------- + +n gamma_n gamma_n^n +1 1 1 +2 1.1547 1.33333 +3 1.25992 2 +4 1.41421 4 +5 1.51572 8 +6 1.66537 21.3333 +7 1.81145 64 +8 2 256 +9 2.24065 1423.51 +10 2.37327 5668.47 +11 2.50503 24375.1 +12 2.63604 112570 +13 2.76637 555686 +14 2.89609 2.91986e+06 +15 3.02525 1.62715e+07 +16 3.15392 9.58535e+07 +17 3.28212 5.95162e+08 +18 3.40991 3.8848e+09 +19 3.5373 2.65934e+10 +20 3.66434 1.90508e+11 diff -Nru eclib-20190909/tests/out_no_ntl/torsion.out eclib-20210625/tests/out_no_ntl/torsion.out --- eclib-20190909/tests/out_no_ntl/torsion.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/torsion.out 2021-06-25 09:53:34.000000000 +0000 @@ -10,13 +10,13 @@ Cyclic: C2 Curve [0,0,0,0,100] has 3 torsion point(s) [0:1:0] (order 1) -[0:10:1] (order 3) [0:-10:1] (order 3) +[0:10:1] (order 3) Cyclic: C3 Curve [0,0,0,1,2] has 4 torsion point(s) [0:1:0] (order 1) -[1:-2:1] (order 4) [-1:0:1] (order 2) +[1:-2:1] (order 4) [1:2:1] (order 4) Cyclic: C4 Curve [0,0,0,-1,0] has 4 torsion point(s) @@ -27,120 +27,120 @@ Non-cyclic: C2 x C2 Curve [0,-1,1,0,0] has 5 torsion point(s) [0:1:0] (order 1) -[1:-1:1] (order 5) [0:-1:1] (order 5) [0:0:1] (order 5) +[1:-1:1] (order 5) [1:0:1] (order 5) Cyclic: C5 Curve [0,0,0,0,1] has 6 torsion point(s) [0:1:0] (order 1) -[2:-3:1] (order 6) -[0:-1:1] (order 3) [-1:0:1] (order 2) +[0:-1:1] (order 3) [0:1:1] (order 3) +[2:-3:1] (order 6) [2:3:1] (order 6) Cyclic: C6 Curve [1,-1,1,-3,3] has 7 torsion point(s) [0:1:0] (order 1) -[3:-6:1] (order 7) -[1:-2:1] (order 7) [-1:-2:1] (order 7) [-1:2:1] (order 7) +[1:-2:1] (order 7) [1:0:1] (order 7) +[3:-6:1] (order 7) [3:2:1] (order 7) Cyclic: C7 Curve [0,1,0,-14624,669300] has 8 torsion point(s) [0:1:0] (order 1) -[418:-8232:1] (order 8) +[75:0:1] (order 2) [124:-882:1] (order 4) +[124:882:1] (order 4) [82:-168:1] (order 8) -[75:0:1] (order 2) [82:168:1] (order 8) -[124:882:1] (order 4) +[418:-8232:1] (order 8) [418:8232:1] (order 8) Cyclic: C8 Curve [0,1,0,-160,308] has 8 torsion point(s) [0:1:0] (order 1) -[26:-120:1] (order 4) -[11:0:1] (order 2) -[26:120:1] (order 4) [-14:0:1] (order 2) -[-4:30:1] (order 4) [2:0:1] (order 2) +[11:0:1] (order 2) [-4:-30:1] (order 4) +[-4:30:1] (order 4) +[26:-120:1] (order 4) +[26:120:1] (order 4) Non-cyclic: C2 x C4 Curve [1,-1,1,-14,29] has 9 torsion point(s) [0:1:0] (order 1) -[9:-29:1] (order 9) -[3:-5:1] (order 9) [1:-5:1] (order 3) +[1:3:1] (order 3) [-3:-5:1] (order 9) [-3:7:1] (order 9) -[1:3:1] (order 3) +[3:-5:1] (order 9) [3:1:1] (order 9) +[9:-29:1] (order 9) [9:19:1] (order 9) Cyclic: C9 Curve [1,0,0,115,561] has 10 torsion point(s) [0:1:0] (order 1) -[70:-629:1] (order 10) -[16:-89:1] (order 5) -[4:-35:1] (order 10) -[-2:-17:1] (order 5) [-34:17:8] (order 2) +[-2:-17:1] (order 5) [-2:19:1] (order 5) -[4:31:1] (order 10) +[16:-89:1] (order 5) [16:73:1] (order 5) +[4:-35:1] (order 10) +[4:31:1] (order 10) +[70:-629:1] (order 10) [70:559:1] (order 10) Cyclic: C10 Curve [1,0,1,-19,26] has 12 torsion point(s) [0:1:0] (order 1) -[13:-52:1] (order 6) -[4:-7:1] (order 3) +[-5:2:1] (order 2) [3:-2:1] (order 2) +[14:-11:8] (order 2) +[4:-7:1] (order 3) [4:2:1] (order 3) -[13:38:1] (order 6) -[-5:2:1] (order 2) +[-2:-7:1] (order 6) [-2:8:1] (order 6) -[1:2:1] (order 6) -[14:-11:8] (order 2) [1:-4:1] (order 6) -[-2:-7:1] (order 6) +[1:2:1] (order 6) +[13:-52:1] (order 6) +[13:38:1] (order 6) Non-cyclic: C2 x C6 Curve [1,0,0,-1070,7812] has 16 torsion point(s) [0:1:0] (order 1) -[244:-3902:1] (order 8) -[64:-482:1] (order 4) -[34:-122:1] (order 8) -[28:-14:1] (order 2) -[34:88:1] (order 8) -[64:418:1] (order 4) -[244:3658:1] (order 8) [-36:18:1] (order 2) -[-26:148:1] (order 8) -[-8:130:1] (order 4) -[4:58:1] (order 8) +[28:-14:1] (order 2) [62:-31:8] (order 2) -[4:-62:1] (order 8) [-8:-122:1] (order 4) +[-8:130:1] (order 4) +[64:-482:1] (order 4) +[64:418:1] (order 4) [-26:-122:1] (order 8) +[-26:148:1] (order 8) +[4:-62:1] (order 8) +[4:58:1] (order 8) +[34:-122:1] (order 8) +[34:88:1] (order 8) +[244:-3902:1] (order 8) +[244:3658:1] (order 8) Non-cyclic: C2 x C8 Curve [1,0,0,-372368141774940800,87459461608665181808640000] has 16 torsion point(s) [0:1:0] (order 1) -[654296320:-11132578294400:1] (order 8) -[369088000:-549923580800:1] (order 4) -[353359600:-34032060800:1] (order 8) +[352179456:-176089728:1] (order 2) [352441600:-176220800:1] (order 2) -[353359600:33678701200:1] (order 8) -[369088000:549554492800:1] (order 4) -[654296320:11131923998080:1] (order 8) [-5636968450:2818484225:8] (order 2) -[117433600:6734213027200:1] (order 8) -[335795200:532525225600:1] (order 4) -[351262480:33612641920:1] (order 8) -[352179456:-176089728:1] (order 2) -[351262480:-33963904400:1] (order 8) [335795200:-532861020800:1] (order 4) +[335795200:532525225600:1] (order 4) +[369088000:-549923580800:1] (order 4) +[369088000:549554492800:1] (order 4) [117433600:-6734330460800:1] (order 8) +[117433600:6734213027200:1] (order 8) +[351262480:-33963904400:1] (order 8) +[351262480:33612641920:1] (order 8) +[353359600:-34032060800:1] (order 8) +[353359600:33678701200:1] (order 8) +[654296320:-11132578294400:1] (order 8) +[654296320:11131923998080:1] (order 8) Non-cyclic: C2 x C8 Curve [0,0,0,-4/9,0] has 4 torsion point(s) [0:1:0] (order 1) diff -Nru eclib-20190909/tests/out_no_ntl/tsat2.out eclib-20210625/tests/out_no_ntl/tsat2.out --- eclib-20190909/tests/out_no_ntl/tsat2.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tsat2.out 2021-06-25 09:53:34.000000000 +0000 @@ -3,57 +3,17 @@ 24129r1 = [0,0,1,-68799,-1969790] 2 points entered:[ [-1870:9257:8] [-197:1984:1] ] +Saturation index bound (for points of good reduction) = 4 +Tamagawa index primes are [ 2 5 ] +adding Tamagawa index prime 5 to saturation list +Checking saturation at [ 2 3 5 ] Checking 2-saturation -Points have successfully been 2-saturated (max q used = 17) +Points were proved 2-saturated (max q used = 17) Checking 3-saturation -Points have successfully been 3-saturated (max q used = 37) +Points were proved 3-saturated (max q used = 37) Checking 5-saturation -Points have successfully been 5-saturated (max q used = 73) -Checking 7-saturation -Points have successfully been 7-saturated (max q used = 37) -Checking 11-saturation -Points have successfully been 11-saturated (max q used = 311) -Checking 13-saturation -Points have successfully been 13-saturated (max q used = 23) -Checking 17-saturation -Points have successfully been 17-saturated (max q used = 29) -Checking 19-saturation -Points have successfully been 19-saturated (max q used = 163) -Checking 23-saturation -Points have successfully been 23-saturated (max q used = 461) -Checking 29-saturation -Points have successfully been 29-saturated (max q used = 883) -Checking 31-saturation -Points have successfully been 31-saturated (max q used = 137) -Checking 37-saturation -Points have successfully been 37-saturated (max q used = 211) -Checking 41-saturation -Points have successfully been 41-saturated (max q used = 263) -Checking 43-saturation -Points have successfully been 43-saturated (max q used = 727) -Checking 47-saturation -Points have successfully been 47-saturated (max q used = 109) -Checking 53-saturation -Points have successfully been 53-saturated (max q used = 307) -Checking 59-saturation -Points have successfully been 59-saturated (max q used = 601) -Checking 61-saturation -Points have successfully been 61-saturated (max q used = 127) -Checking 67-saturation -Points have successfully been 67-saturated (max q used = 443) -Checking 71-saturation -Points have successfully been 71-saturated (max q used = 151) -Checking 73-saturation -Points have successfully been 73-saturated (max q used = 1181) -Checking 79-saturation -Points have successfully been 79-saturated (max q used = 809) -Checking 83-saturation -Points have successfully been 83-saturated (max q used = 1249) -Checking 89-saturation -Points have successfully been 89-saturated (max q used = 2017) -Checking 97-saturation -Points have successfully been 97-saturated (max q used = 2351) -Finished p-saturation for p up to 100, points were saturated +Points were proved 5-saturated (max q used = 73) +Finished p-saturation, points were saturated =============================================================== diff -Nru eclib-20190909/tests/out_no_ntl/tsatbnd.out eclib-20210625/tests/out_no_ntl/tsatbnd.out --- eclib-20190909/tests/out_no_ntl/tsatbnd.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tsatbnd.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,172 @@ +====================================================== + +E = [0,0,1,-7,36] +4 points entered: +[1:-6:1] (height 1.63497489286394) +[-30:21:8] (height 3.23143983180252) +[-3:5:1] (height 1.8051880666154) +[-2:6:1] (height 1.75120185338337) +Regulator of input points: 3.30637847459132 +Subgroup of EGR points has index 1 + + Images of points in component groups at bad primes and R + +p Group Image(s) +545723 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] +R [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] + +Global Tamagawa number: 1 +Global Tamagawa exponent: 1 +lower height bound (egr points): 0.210224103813429 +bound on saturation index (egr points): 82 +lower height bound (all points): 0.210224103813429 +bound on saturation index (all points): 82 +====================================================== + +E = [1,1,1,-218325338,-1241755642969] +1 points entered: +[52725:11541787:1] (height 7.39057471768362) +Regulator of input points: 7.39057471768362 +Subgroup of EGR points has index 6 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 6 ] [ 2 ] +3 [ 2 ] [ 1 ] +5 [ 4 ] [ 2 ] +7 [ 1 ] [ 0 ] +17 [ 1 ] [ 0 ] +43 [ 1 ] [ 0 ] +R [ 2 ] [ 0 ] + +Global Tamagawa number: 96 +Global Tamagawa exponent: 12 +lower height bound (egr points): 0.942172089516167 +bound on saturation index (egr points): 16 +lower height bound (all points): 0.00654286173275116 +bound on saturation index (all points): 33 +====================================================== + +E = [0,0,1,-23737,960366] +8 points entered: +[36:390:1] (height 4.93616536362293) +[-87:1538:1] (height 5.35042153456194) +[181:1610:1] (height 5.37267903258081) +[-159:845:1] (height 5.5113840512311) +[-29:1274:1] (height 5.1867535784134) +[-11005:192282:125] (height 8.57190341268437) +[-3021:40175:27] (height 7.60749929757449) +[10532:78629:64] (height 8.06085211926412) +Regulator of input points: 260586.997204953 +Subgroup of EGR points has index 2 + + Images of points in component groups at bad primes and R + +p Group Image(s) +457532830151317 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +R [ 2 ] [ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ] + +Global Tamagawa number: 2 +Global Tamagawa exponent: 2 +lower height bound (egr points): 4.84538508610588 +bound on saturation index (egr points): 29 +lower height bound (all points): 1.21134627152647 +bound on saturation index (all points): 3793 +====================================================== + +E = [0,1,0,-3532341,2671895459] +1 points entered: +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] (height 200.116146237352) +Regulator of input points: 200.116146237352 +Subgroup of EGR points has index 2 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 1 ] [ 0 ] +5 [ 1 ] [ 0 ] +7 [ 1 ] [ 0 ] +41 [ 2 2 ] [ 1 0 ] +R [ 1 ] [ 0 ] + +Global Tamagawa number: 2 +Global Tamagawa exponent: 2 +lower height bound (egr points): 1.46686324452063 +bound on saturation index (egr points): 23 +lower height bound (all points): 0.366715811130157 +bound on saturation index (all points): 23 +====================================================== + +E = [0,1,1,-9872,374262] +4 points entered: +[57:0:1] (height 1.04980138282295) +[56:13:1] (height 1.93419849519224) +[458:19:8] (height 2.78810110289101) +[36:-259:1] (height 3.57409195177616) +Regulator of input points: 13.9954728915898 +Subgroup of EGR points has index 1 + + Images of points in component groups at bad primes and R + +p Group Image(s) +24191611 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] +R [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] + +Global Tamagawa number: 1 +Global Tamagawa exponent: 1 +lower height bound (egr points): 0.0251639114367071 +bound on saturation index (egr points): 11816 +lower height bound (all points): 0.0251639114367071 +bound on saturation index (all points): 11816 +====================================================== + +E = [0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +12 points entered: +[11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] (height 20.7249582788064) +[7623939119367566734712416:221638196641185505905607878680125440:6859] (height 22.4088105212294) +[36426251939262077044010523050021856:1440660184888000534262415597113906110443804160:7723644690663] (height 28.2138182871606) +[-2374492566122734660340122:529890342210233698629090661148812455:2744] (height 25.2626562864233) +[133315763430614733564506995979036000:12052050702684033030644774922369112945461998208:13452404189687] (height 26.0653444838548) +[-736456133932085217609486905120:65252742580786613608001616883511206150656:281011375] (height 18.5493379088294) +[-595772851387421768949418976:167161309967794524103557005329392387840:912673] (height 27.3468387110325) +[6022489089748785062867974730217810:556978335673856277257836463329999151388906387:588059226152] (height 31.2385084203718) +[-14469357974751181338226317055916720:4882855888975145618903473912921126613023223376:27655941287521] (height 27.9228560029315) +[401117760561576371833764564008128488352:9772673504421360502054799343252140728954874846976:98542628343088957] (height 28.9274716740178) +[289759090016726210750821602762394720:4585180501130133566892803635614473034268791168:75274392943567] (height 26.0812320079939) +[147460739409404501162213937304:6903716310575347660155145984848699291480:143055667] (height 28.7633608261539) +Regulator of input points: 165496855732756 +Subgroup of EGR points has index 12582912 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 16 ] [ 1 ][ 8 ][ 7 ][ 0 ][ -5 ][ 7 ][ -6 ][ 0 ][ -2 ][ -6 ][ 5 ][ 1 ] +3 [ 12 ] [ -5 ][ 4 ][ 0 ][ -5 ][ 1 ][ 3 ][ -5 ][ 0 ][ -4 ][ 3 ][ 3 ][ -2 ] +7 [ 4 ] [ 2 ][ 2 ][ 0 ][ 0 ][ 1 ][ 2 ][ 2 ][ 2 ][ 1 ][ 0 ][ 0 ][ 1 ] +13 [ 4 ] [ 2 ][ 2 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ][ 2 ][ 2 ][ 2 ] +29 [ 2 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ] +31 [ 4 ] [ 1 ][ 1 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ][ 1 ][ 2 ][ 1 ][ 2 ][ 1 ] +43 [ 2 ] [ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ] +73 [ 2 ] [ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ] +79 [ 4 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 1 ] +83 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +89 [ 2 ] [ 0 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 1 ] +151 [ 2 ] [ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +199 [ 2 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 1 ] +239 [ 4 ] [ 0 ][ 2 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ] +263 [ 4 ] [ 0 ][ 0 ][ 2 ][ 2 ][ 1 ][ 1 ][ 2 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ] +601 [ 4 ] [ 2 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 2 ][ 2 ][ 1 ][ 2 ][ 1 ] +617 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ] +1433 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +3449 [ 2 ] [ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ] +6199 [ 2 ] [ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ] +1607849 [ 2 ] [ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ] +R [ 2 ] [ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ] + +Global Tamagawa number: 25769803776 +Global Tamagawa exponent: 48 +lower height bound (egr points): 49.6596671139444 +bound on saturation index (egr points): 3621299 +lower height bound (all points): 0.0215536749626495 +bound on saturation index (all points): 43050497269923774464 diff -Nru eclib-20190909/tests/out_no_ntl/tsat.out eclib-20210625/tests/out_no_ntl/tsat.out --- eclib-20190909/tests/out_no_ntl/tsat.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tsat.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,12 +1,54 @@ -verbose (0/1)? -Input a curve: Curve [0,0,1,-7,36] -enter number of points: - enter point 1 : - enter point 2 : - enter point 3 : - enter point 4 : 4 points entered. -prime p to saturate at? -Saturating at prime 11 +====================================================== + +E = [0,0,1,-7,36] +4 points entered. + +Saturating at primes from 3 up to 31 Original generators: [ [1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] ] -Finished p-saturation for p = 11, points were saturated +Finished saturation +Saturation was successful: points were saturated. +====================================================== + +E = [1,1,1,-218325338,-1241755642969] +1 points entered. + +Saturating at all primes +Original generators: +[ [52725:11541787:1] ] +Finished saturation +Saturation was successful: points were saturated. +====================================================== + +E = [0,0,1,-23737,960366] +8 points entered. + +Saturating at all primes +Original generators: +[ [36:390:1] [-87:1538:1] [181:1610:1] [-159:845:1] [-29:1274:1] [-11005:192282:125] [-3021:40175:27] [10532:78629:64] ] +Finished saturation +Saturation was successful: index gain = 5. +New generators: +[ [36:390:1] [-87:1538:1] [181:1610:1] [7046:-2067064:2197] [-29:1274:1] [-11005:192282:125] [-3021:40175:27] [10532:78629:64] ] +====================================================== + +E = [0,1,0,-3532341,2671895459] +1 points entered. + +Saturating at primes from 3 up to 3 +Original generators: +[ [-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] ] +Finished saturation +Saturation was successful: index gain = 3. +New generators: +[ [2039080769383242:43530702836852015:1260762051627] ] +====================================================== + +E = [0,1,1,-9872,374262] +4 points entered. + +Saturating at primes from 1 up to 211 +Original generators: +[ [57:0:1] [56:13:1] [458:19:8] [36:-259:1] ] +Finished saturation +Saturation was successful: points were saturated. diff -Nru eclib-20190909/tests/out_no_ntl/tversion.out eclib-20210625/tests/out_no_ntl/tversion.out --- eclib-20190909/tests/out_no_ntl/tversion.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_no_ntl/tversion.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,12 @@ +This eclib version is 20210625 +[ year month day ] = [ 2021 6 25 ] + +Configure options and compilation date: + +eclib version 20210625, using NTL bigints but no multiprecision floating point + +Testing comparison of version date and various (year, month, day) date triples: + +Date 20200101 is before the version date 20210625 +Date 20300611 is after the version date 20210625 +Date 20210317 is before the version date 20210625 diff -Nru eclib-20190909/tests/out_ntl/allisog.out eclib-20210625/tests/out_ntl/allisog.out --- eclib-20190909/tests/out_ntl/allisog.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/allisog.out 2021-06-25 09:53:34.000000000 +0000 @@ -4,10 +4,10 @@ [ [1,0,1,4,-6] [1,0,1,-36,-70] [1,0,1,-1,0] [1,0,1,-171,-874] [1,0,1,-11,12] [1,0,1,-2731,-55146] ] [0,2,3,3,0,0;2,0,0,0,3,3;3,0,0,0,2,0;3,0,0,0,0,2;0,3,2,0,0,0;0,3,0,2,0,0] -[ [1,1,1,-10,-10] [1,1,1,-5,2] [1,1,1,35,-28] [1,1,1,-135,-660] [1,1,1,-80,242] [1,1,1,0,0] [1,1,1,-110,-880] [1,1,1,-2160,-39540] ] -[0,2,2,2,0,0,0,0;2,0,0,0,2,2,0,0;2,0,0,0,0,0,0,0;2,0,0,0,0,0,2,2;0,2,0,0,0,0,0,0;0,2,0,0,0,0,0,0;0,0,0,2,0,0,0,0;0,0,0,2,0,0,0,0] +[ [1,1,1,-10,-10] [1,1,1,35,-28] [1,1,1,-135,-660] [1,1,1,-5,2] [1,1,1,-110,-880] [1,1,1,-2160,-39540] [1,1,1,-80,242] [1,1,1,0,0] ] +[0,2,2,2,0,0,0,0;2,0,0,0,0,0,0,0;2,0,0,0,2,2,0,0;2,0,0,0,0,0,2,2;0,0,2,0,0,0,0,0;0,0,2,0,0,0,0,0;0,0,0,2,0,0,0,0;0,0,0,2,0,0,0,0] -[ [1,-1,1,-1,-14] [1,-1,1,-6,-4] [1,-1,1,-1,0] [1,-1,1,-91,-310] ] +[ [1,-1,1,-1,-14] [1,-1,1,-6,-4] [1,-1,1,-91,-310] [1,-1,1,-1,0] ] [0,2,0,0;2,0,2,2;0,2,0,0;0,2,0,0] [ [0,1,1,-9,-15] [0,1,1,1,0] [0,1,1,-769,-8470] ] @@ -16,8 +16,8 @@ [ [0,1,0,4,4] [0,1,0,-1,0] [0,1,0,-36,-140] [0,1,0,-41,-116] ] [0,2,3,0;2,0,0,3;3,0,0,2;0,3,2,0] -[ [1,0,0,-4,-1] [1,0,0,-39,90] [1,0,0,1,0] [1,0,0,-49,-136] [1,0,0,-34,-217] [1,0,0,-784,-8515] ] -[0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] +[ [1,0,0,-4,-1] [1,0,0,-39,90] [1,0,0,-49,-136] [1,0,0,1,0] [1,0,0,-34,-217] [1,0,0,-784,-8515] ] +[0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,2,2;2,0,0,0,0,0;0,0,2,0,0,0;0,0,2,0,0,0] [ [0,-1,0,-4,4] [0,-1,0,-64,220] [0,-1,0,1,0] [0,-1,0,-24,-36] [0,-1,0,16,-180] [0,-1,0,-384,-2772] ] [0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] diff -Nru eclib-20190909/tests/out_ntl/checkgens.out eclib-20210625/tests/out_ntl/checkgens.out --- eclib-20190909/tests/out_ntl/checkgens.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/checkgens.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,5 +1,5 @@ 268605a1 [0,0,1,1032,2673]: r = 1 torsion group structure = [ ] (torsion rank 0). -P = [41:337:1] OK, order=oo, height=0.59990651734770452119201067744. +P = [41:337:1] OK, order=oo, height=0.59990651734770452119201067743. 268605b1 [0,0,1,14802,-4767741]: r = 1 torsion group structure = [ ] (torsion rank 0). P = [52199:344443:343] OK, order=oo, height=4.8009119417025658580313798627. 268605c1 [1,-1,0,-450,2781]: r = 2 torsion group structure = [ ] (torsion rank 0). @@ -19,18 +19,18 @@ P = [-64232978894:39611125679:622835864] OK, order=oo, height=17.062131548620909930450508847. P = [-826:413:8] OK, order=2, height=0. 268605e1 [1,-1,0,8256,753083]: r = 1 torsion group structure = [ 2 ] (torsion rank 1). -P = [395144:10859243:512] OK, order=oo, height=8.5829151366781123251964064487. +P = [395144:10859243:512] OK, order=oo, height=8.5829151366781123251964064488. P = [-62:31:1] OK, order=2, height=0. 268605e2 [1,-1,0,-91149,9441080]: r = 1 torsion group structure = [ 2 2 ] (torsion rank 2). P = [317636:-1639318:1331] OK, order=oo, height=4.2914575683390561625982032244. P = [998:-499:8] OK, order=2, height=0. P = [220:-110:1] OK, order=2, height=0. 268605e3 [1,-1,0,-1413024,646849205]: r = 1 torsion group structure = [ 2 ] (torsion rank 1). -P = [7372618:-6306479:10648] OK, order=oo, height=8.5829151366781123251964064501. +P = [7372618:-6306479:10648] OK, order=oo, height=8.5829151366781123251964064488. P = [5510:-2755:8] OK, order=2, height=0. 268605e4 [1,-1,0,-359754,-73128097]: r = 1 torsion group structure = [ 2 ] (torsion rank 1). -P = [265770428:14415192911:85184] OK, order=oo, height=8.5829151366781123251964064487. +P = [265770428:14415192911:85184] OK, order=oo, height=8.5829151366781123251964064488. P = [-3514:1757:8] OK, order=2, height=0. 268605f1 [0,0,1,-110937,14226165]: r = 1 torsion group structure = [ ] (torsion rank 0). -P = [1554:631:8] OK, order=oo, height=1.9389206422900754768913015598. +P = [1554:631:8] OK, order=oo, height=1.9389206422900754768913015595. 268605g1 [0,0,1,-747,8255]: r = 0 torsion group structure = [ ] (torsion rank 0). diff -Nru eclib-20190909/tests/out_ntl/smattest.out eclib-20210625/tests/out_ntl/smattest.out --- eclib-20190909/tests/out_ntl/smattest.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/smattest.out 2021-06-25 09:53:34.000000000 +0000 @@ -2231,6 +2231,6 @@ done rank using echmodp : 95 number of non-zero entries: 525 rank is:95 - number of non-zero entries: 434 + number of non-zero entries: 427 kernel correct enter new value of t diff -Nru eclib-20190909/tests/out_ntl/tdivpol.out eclib-20210625/tests/out_ntl/tdivpol.out --- eclib-20190909/tests/out_ntl/tdivpol.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tdivpol.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,7 +1,87 @@ Curve [0,0,1,-7,6] -Division Poly (2) = [ 25 -28 0 4 ] -Division Poly (3) = [ -49 75 -42 0 3 ] -Division Poly (5) = [ 155774 -406875 380975 -219125 224875 -213150 93525 -10500 -5145 2375 -434 0 5 ] -Division Poly (7) = [ -18468518451 129897313175 -445857037878 932404235875 -1243400007052 1026876435550 -437452731142 -17749822300 107968849198 -15732678675 -41963963776 32734719500 -10597551734 1215763500 204773548 -134374100 71781619 -28348950 5133611 4900 -144746 24650 -2156 0 7 ] -Division Poly (9) = [ 184160099143680751 -1745915691101562000 7553596765573730970 -20009912719373528175 37942026581120864697 -60375121456041861525 93410183300843035368 -141970066026214424625 190405429869508518294 -205725048911535979875 170148544422339746088 -101903285497398603750 37479654863464097844 -301195540341584325 -10122360365346701220 7022704801725188100 -2024994639983255253 -378932954398234425 638476088702667243 -278350695029482875 46649147045567535 8235437040258750 -4808056523794875 -19863562351500 413123504333085 -21629335715325 -61645404898854 25482225972000 -4079567512557 -51564996000 145726971768 -34704720000 6686917839 -1118177550 97716879 3647700 -1573194 142650 -7308 0 9 ] -Division Poly (11) = [ -54041658613892771450681999 880907080312611332584912000 -7219594509378023629107644470 38958100184313046991444736425 -152640690458238768754008318817 454785460748010763365906132375 -1056137061172539849022036113531 1936054859688651591523350738175 -2810594691494082952472648616520 3208473937931657698860198494875 -2822039231599463382188559156202 1848423918012109590080578699875 -912617258569632579061077286483 560913385968977938523311946800 -817656871503167956435977465356 1249509868334450532408690045625 -1414165966153163021643340433938 1199336430865617781090316458650 -784676191760539643225675692205 396756309706661409373382542875 -144956275362751028758501833067 23355448732213310557101714875 17220044440091899138064455473 -20247521386823417986151910750 11805434554239601412412797599 -4040005394287265921365582350 234083284571165543297755125 642823838857235347992405825 -419159192063093806076371388 127589838582618892736949000 -6470559713355987866471481 -12226425861215930742609000 5613930837990861266425006 -822808169809586975048075 -285218373979309991270589 186775240363627878171825 -38115245033833256003913 -4184634313923610398775 4784966662201425769762 -1316603611701382184125 126856023732928120092 24162795683139180375 -9281076375640161037 1097831192157003150 -100276466219262732 63186211155991825 -25032991453137052 4693816276634100 -310935739698815 -50338154356875 15290737879263 -2102529532125 227429915559 -21041940150 1025882033 51025100 -10176859 580525 -19558 0 11 ] + +Division polynomials: + +Division Poly (2) = [25 -28 0 4] +Division Poly (3) = [-49 75 -42 0 3] +Division Poly (4) = [61 350 -490 250 -70 0 2] +Division Poly (5) = [155774 -406875 380975 -219125 224875 -213150 93525 -10500 -5145 2375 -434 0 5] +Division Poly (6) = [-7450597 33433150 -55698846 38175900 2995139 -22858500 16502416 -7083900 3172008 -1401400 336784 0 -17836 4200 -504 0 3] +Division Poly (7) = [-18468518451 129897313175 -445857037878 932404235875 -1243400007052 1026876435550 -437452731142 -17749822300 107968849198 -15732678675 -41963963776 32734719500 -10597551734 1215763500 204773548 -134374100 71781619 -28348950 5133611 4900 -144746 24650 -2156 0 7] +Division Poly (8) = [-2571419770853 1215506524050 67371048936842 -320148770148050 780063910616298 -1249129857057600 1423544884020198 -1160552647602600 621047252595462 -133390086758000 -94508756302632 102557214742500 -42735421158370 6650264571300 470955582384 859919970900 -1163784258588 520062744600 -101339901340 -2100672000 5910589524 -1768634400 442778784 -97461000 11262114 409500 -266364 31300 -2044 0 4] +Division Poly (9) = [184160099143680751 -1745915691101562000 7553596765573730970 -20009912719373528175 37942026581120864697 -60375121456041861525 93410183300843035368 -141970066026214424625 190405429869508518294 -205725048911535979875 170148544422339746088 -101903285497398603750 37479654863464097844 -301195540341584325 -10122360365346701220 7022704801725188100 -2024994639983255253 -378932954398234425 638476088702667243 -278350695029482875 46649147045567535 8235437040258750 -4808056523794875 -19863562351500 413123504333085 -21629335715325 -61645404898854 25482225972000 -4079567512557 -51564996000 145726971768 -34704720000 6686917839 -1118177550 97716879 3647700 -1573194 142650 -7308 0 9] +Division Poly (10) = [413009374512445941380 -5577533221799587495650 34236508339578868067654 -126719683386541187863300 312994894498933292419431 -530641300710685283735000 585897029187423197307976 -280834885094634332916300 -367204662156668126267015 1082254486519067947850050 -1554831039561822593605650 1672867489720306188031100 -1511763332284285767508693 1186278164953699558211100 -786873604739812654099112 405920703060332401917500 -130861468159990009717737 -5601080695755881466900 37964990852501696833520 -25524121253263387893600 8897497566342411821410 -784837740659180354300 -925670621559347454588 522167496232044339600 -83452626309791455327 -45657452461518723000 34482142926904321488 -10360740343811041800 1058457111228061160 328746903184114800 -137359646628361520 17449112283988000 -1181088726955137 1434498958414150 -782923178241638 188460706507500 -17341433546593 -2258719474900 951528824400 -162366029100 21994486360 -2572647000 159807824 8131200 -2124444 149000 -6104 0 5] +Division Poly (11) = [-54041658613892771450681999 880907080312611332584912000 -7219594509378023629107644470 38958100184313046991444736425 -152640690458238768754008318817 454785460748010763365906132375 -1056137061172539849022036113531 1936054859688651591523350738175 -2810594691494082952472648616520 3208473937931657698860198494875 -2822039231599463382188559156202 1848423918012109590080578699875 -912617258569632579061077286483 560913385968977938523311946800 -817656871503167956435977465356 1249509868334450532408690045625 -1414165966153163021643340433938 1199336430865617781090316458650 -784676191760539643225675692205 396756309706661409373382542875 -144956275362751028758501833067 23355448732213310557101714875 17220044440091899138064455473 -20247521386823417986151910750 11805434554239601412412797599 -4040005394287265921365582350 234083284571165543297755125 642823838857235347992405825 -419159192063093806076371388 127589838582618892736949000 -6470559713355987866471481 -12226425861215930742609000 5613930837990861266425006 -822808169809586975048075 -285218373979309991270589 186775240363627878171825 -38115245033833256003913 -4184634313923610398775 4784966662201425769762 -1316603611701382184125 126856023732928120092 24162795683139180375 -9281076375640161037 1097831192157003150 -100276466219262732 63186211155991825 -25032991453137052 4693816276634100 -310935739698815 -50338154356875 15290737879263 -2102529532125 227429915559 -21041940150 1025882033 51025100 -10176859 580525 -19558 0 11] + +Multiplication-by-n maps (x coordinate): + +n = 2: +Numerator: [49 -50 14 0 1] +Denominator: [25 -28 0 4] +n = 3: +Numerator: [-1525 -4641 14700 -10473 1050 1470 -600 84 0 1] +Denominator: [2401 -7350 9741 -6300 1470 450 -252 0 9] +n = 5: +Numerator: [11362160425 25747089400 -441542258500 1506059616215 -2610427772875 2620690440081 -1387765627500 -5048462735 622380767750 -514545267425 213273944550 -37895439750 -6392442000 5509239565 -1991083500 805974932 -259821875 26485165 8844500 -2116075 -204050 110250 -13000 700 0 1] +Denominator: [24265539076 -126761092500 284239264925 -378286361750 393514275875 -416360781200 421947611075 -340338334000 222184587415 -139925348500 86109315418 -40174487500 9539139565 1483576500 -2055966500 735111700 -102334925 -17456250 11041735 -2166500 136906 23750 -4340 0 25] +n = 7: +Numerator: [-478965310761451231025 3253200126164286188149 493504842253691880150 -87437670391256256814141 481053400926406685558475 -1474524847437726457036608 3051293047895397342722300 -4507790169717305498341981 4708354723086060377511600 -3031718411072855187719700 100320809977898287428700 2584762647056569539994518 -3803952756150941424717400 3428800794002557340072846 -2220821754300618338952600 1043523046720703474603804 -312300468078508586572175 1442623950439048333404 74652464685011903431000 -62420322870375191780779 32723404759644607191750 -10817148832748217403500 983621853556791774500 1094908222340954435400 -597643354403853229500 85498396077199034566 40785097726864444800 -20343885839157086724 223835554725509900 2681079531989243980 -1026461532749354800 119137846302349868 37877316216756800 -18977605618891227 3304306659173450 8701877287670 -135764897535400 34412538727721 -5354282777900 727182801268 -86238689250 4295207210 519821400 -43847846 -10392900 1754788 -98000 2744 0 1] +Denominator: [341086173774927439401 -4798021850215625783850 33341949831200126354581 -150271512229128794144550 486949620236074001282038 -1192396394453621322632800 2261070134715425544591521 -3347375281558187150583900 3842454854008922612126960 -3324943281677884470444750 2010418069392193707136282 -651020404345562013303800 -96608621157166208197954 166151917069487225505300 48699725372809023988580 -178444916497903457931200 144560299534716328862298 -54814088180206102522950 961202166802238932207 8616789704135225396700 -2291677169592145859020 -1813626803872896374350 1838081104627613478024 -798819036672743394000 191378585118824669566 -10013444688503331600 -15500999700626997900 10243440676476617400 -4123480548928793500 1066016998482282000 -119062576319787996 -30000425318197600 19749888363614829 -6463294466493550 1585109901891446 -246150026516100 -2360054651479 12392379246100 -3190374052068 372027946500 61786550 -7553991900 1303637806 -106222200 2621892 345100 -30184 0 49] + +Testing division of points: + +P = [0:2:1] +2*P = [245:-32:125], divided by 2 gives back P, OK +3*P = [-74725:-438957:117649], divided by 3 gives back P, OK +5*P = [1769929178043950:4738372533007263:3779940084024824], divided by 5 gives back P, OK +7*P = [-8845779679186810919721876142275:-26132116500093837448172183040908:6299356293743239735763552887851], divided by 7 gives back P, OK +11*P = [-345907035865394112110113258379175841526681422618969349065465631483788171611500:-603899496397932670693901238084339680074376067505653656300679516648438378729902:157828710767928051843902784106074829349824572090398507020120360018086980045999], divided by 11 gives back P, OK +13*P = [4330944971498881477952763040195461194737358561970732874089910688931368534665435456142865934677314444316324525:474166894211156940132146040087902301358254640922900664396468316978550001533595729712356829915629891398826393:4459345156448775844130923624171028485455804112741895938417180204973106756635206294993276819983272953020126899], divided by 13 gives back P, OK + +P = [1:0:1] +2*P = [14:51:1], divided by 2 gives back P, OK +3*P = [858:3056:2197], divided by 3 gives back P, OK +5*P = [-13422227300:37155830557:12167000000], divided by 5 gives back P, OK +7*P = [-654363158444498413938:323334584599779613133:232135196336821724283], divided by 7 gives back P, OK +11*P = [-5386909266611602426586636855741750187975628118240481:-31903410988726312174342705633718553251007282422752800:8563273080452283301577237101778658433493825993941319], divided by 11 gives back P, OK +13*P = [6790601027182872441717735378318194615000557734419531444518829576329287422:-21346190491686533430108554189028709484678265994449397859310470032693638296:10895308449429756233096859998848382387567744114034063749875541435853032123], divided by 13 gives back P, OK + +P = [2:0:1] +2*P = [21:-96:1], divided by 2 gives back P, OK +3*P = [17347:11477:6859], divided by 3 gives back P, OK +5*P = [1314368321100:2192807253559:296474109632], divided by 5 gives back P, OK +7*P = [787735371750610845962493:2815013979731975184348416:58266402897702006018621], divided by 7 gives back P, OK +11*P = [465224049592215941888315944477150086362582688911509781121082:-2835041364493288591742476527691666698801289699650164214285000:12520837463201904227545769580855021289721316529527142889041], divided by 11 gives back P, OK +13*P = [967652288848675141165417507105084877050922452157366640667361749659468531276841232963:-2467719925245805762134421012865078764322728240276925184295644784012954762439103997267:137922062795787281492160592505828749775362042044145821626654801172360654848016552211], divided by 13 gives back P, OK + +P = [3:3:1] +2*P = [742:-552:343], divided by 2 gives back P, OK +3*P = [1735612:-8697671:68921], divided by 3 gives back P, OK +5*P = [13274790938560307650:-3810346189413166609:6816655498982663368], divided by 5 gives back P, OK +7*P = [15610084384521543609511648390658094288:68045384727563741553482631637942786750:797803639727363681600463977477765079], divided by 7 gives back P, OK +11*P = [1575803501107696145915932812044229184495312851311623153876318357968752759104183973347056429397:1396274583140038254949640133020198974959304566276876829967194082976845151053935966087848230097:557829383989248411534035078306591098535924517768571182260197731835239742103251080379853060699], divided by 11 gives back P, OK +13*P = [6161146492714921360750727810183946205467564656490939099032408800798722540272737508766984883606134682101989119243397164919137164312:-35721620630687298226865205673450160556524720425884654664577788075243215491371022249911678723584335179331885213925899777407539593821:183117292199220258281649737393844871119425437622572982949683718143218212229910662967343636339932171621634631574337220088031542071], divided by 13 gives back P, OK + +P = [-1:-4:1] +2*P = [798:377:343], divided by 2 gives back P, OK +3*P = [4430992:-438330:4330747], divided by 3 gives back P, OK +5*P = [-12221903491172643150:11468039763290751651:4885740073494125000], divided by 5 gives back P, OK +7*P = [17650003281779675566729443347938708188:-192526580513012204672730365490691444763:72980796628288414077404408180857060533], divided by 7 gives back P, OK +11*P = [-30613130525745975806945896359562605604200966296242976777041809153479858248968536822155766662519:-15714745521957622294462788054133735354109125384042241494977265337200555303010618130240791627276:10342901057480405091454441780213283779071882904636290875244915407676321355926935920245292819619], divided by 11 gives back P, OK +13*P = [1405907707042133954154238850941035663903445083801514062880744416997628088406667394648913262927105511332783388554595372344393472664228:-2211226265150483927592113283252013630287688089685314399591313107761425853236835065390795882450722392047791605464694483959070884011570:1600088061666351860094194147994818358340122989198013456481419612192269188713359699781782586135291445838482977423277673449499162776373], divided by 13 gives back P, OK + +P = [-3:-1:1] +2*P = [406:8180:1], divided by 2 gives back P, OK +3*P = [-198562138:-133849341:68417929], divided by 3 gives back P, OK +5*P = [-868891893753069223266400:-892775925650647678206441:320035512450753499922432], divided by 5 gives back P, OK +7*P = [-250789195524699438713028256143149165935010703462:-351763092836663361098186249071565146814058578612:102208756706176009076316662108042042887248607671], divided by 7 gives back P, OK +11*P = [-5888498972561699214345998647776423563516419612163855732932875428098479096816453556740071283543529303920465099353451197:-13533256227761692733082484218341561251156460176136586962103570474399526108120718796397535148131526130064613929899679999:3291138473665024086163024275753883782780254080619125033356991189541952502966715638923169363573135424125729714408703999], divided by 11 gives back P, OK +13*P = [-471304787040968158056679651141156035898503824031997613220205307381493602197020538234554557851623914285000405516091920163285632114952834039661937557168333773226984038:-1370873330960135587145910098464877803541908169825891341967548989668552498702749973686005785221486327913645312167741302000549449734377969308776534759994492228417393091:330212063553055881533947376167502836269069675579486301004644611488773223934819786676041306852236930427317775633620010841259816717836527910178288832111727833861202679], divided by 13 gives back P, OK + +P = [4:-7:1] +2*P = [4277:-1045:2197], divided by 2 gives back P, OK +3*P = [173402493:270630132:41781923], divided by 3 gives back P, OK +5*P = [347958005352980994267950:-591491125266464506985649:90144087121871684875000], divided by 5 gives back P, OK +7*P = [28346791926960812679644342662875487909944722853:46007717633420125671884939882166416087274190645:6574733970234508106612925608541549400717628583], divided by 7 gives back P, OK +11*P = [17474145883556647766828376232602106710826303890390986982624317936592550275465510611644786949719563721070184568269144:29480256355813074498457852565032175239305961624890346125612405835647274977712834264461974502384623321822021473979573:3896217090865641720447450673233504443391236048556578877575563503584301366068007409294978657913670393568854035781361], divided by 11 gives back P, OK +13*P = [141214430924449205970890907019814623022662416842585435331280731630294938794541398360467356587791564443343502605886099748817931388768459086946049432514093725256267:-226503185172742643796701194535524557733787205454975272078361208779360866680687110556127834139290657225066635029141642546627353273657327903648741011104842867737892:39145148418716729635148349998510974266838033447983885103993474847107471829372688807853030441396426545342852451854525365130399276623238448918996402000657968479137], divided by 13 gives back P, OK diff -Nru eclib-20190909/tests/out_ntl/theight.out eclib-20210625/tests/out_ntl/theight.out --- eclib-20190909/tests/out_ntl/theight.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/theight.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,12 +1,6 @@ Computed 78519 primes, largest is 1000253 Extra primes in list: -Input a curve: Curve [1,0,0,-9632000,11505156432] -b2 = 1 b4 = -19264000 b6 = 46020625728 b8 = -92763918843568 -c4 = 462336001 c6 = -9941148661249 -disc = 1806000 (# real components = 2) -#torsion not yet computed - -Input a point on curve, [0] to finish: +Curve [1,0,0,-9632000,11505156432] Point [1794:-732:1] has infinite order Local heights: Sum so far = 0 @@ -17,18 +11,51 @@ 7: 0 43: 0 Sum so far = -1.5928189937093592317967636465777575190736926702825365885322752681028312082823762131244867473094337561898 -R: 2.6591777372351697106379171777341996972920761893137085990849604193273227819567664580094427825708178591443 +R: 2.6591777372351697106379171777341996972920761893137085990849604193273227819567664580094427822110846671662 + +Sum of local heights: 1.0663587435258104788411535311564421782183835190311720105526851512244915736743902448849560349016509109764 +global height of [1794:-732:1] is 1.0663587435258104788411535311564421782183835190311720105526851512244915736743902448849560349016509109764 +Curve [0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +Input curve is not minimal at [ 2 ] +Heights will be computed after mapping points to the minimal model [1,0,0,-1209873315556653510389989204544209972082084,331058311839965956052748107957148273288865814054655695750098704] +Point [11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] has infinite order +Local heights: +1303: 14.344849154249690235603620395077325556187893008120017198267101647487168571034698862883609598254465320882 +Sum so far = 14.344849154249690235603620395077325556187893008120017198267101647487168571034698862883609598254465320882 +log(den(x(P))) = 14.344849154249690235603620395077325556187893008120017198267101647487168571034698862883609598254465320882 +2: -0.64982548177494872757865511386704053257078137596273930073813750890005652059658879588049686905914251957063 +3: -3.2042858419486532665694652743573666385551807936496859008928584731093583552209428200480459515400519256316 +7: -1.9459101490553133051053527434431797296370847295818611884593901499375798627520692677876584985878715269931 +13: -2.5649493574615367360534874415653186048052679447602071164190455106634646673244101793995746634404894887693 +29: -1.683647914993237013591636016180955802747256456961372039460835175821390390568926166646683557408928211323 +31: -2.5754904033638596844468732434067679078374541978604439788175385543562360624481634241603986235020649729297 +43: -1.8806000578467812117364212566729235177795680924407777075958426324614295869364932192687959990419986434488 +73: 0 +79: -3.2770858893502661206297091561110581916301559183169572190591283381698545458433242086094552743305597049787 +83: 0 +89: 0 +151: 0 +199: -2.6466524123622461977050606459342686009455526402847362494532304939720496026904579500629921371491090237371 +239: 0 +263: 0 +601: -6.3985949345352075792730805065791461321158652517313974246007004844989970499719731737852755946786480364573 +617: 0 +1433: 0 +3449: -4.072919806468420453392926484639460182502821920485483498613314298014594425119712262801577989827526315447 +6199: -4.3660716338509596986144265790573211827559692709318631192630445064520287152938899407747291356332810471928 +1607849: -7.1452039094195084867538538892263668870756826570435860169910410159563007931008167769280037358413050635495 +Sum so far = -28.066388638181248245847327955963848354770748241891093562097005494826172006833069323270078431786511159146 +R: 48.791346916987674129415518895963499708776538989235459332368713903014226657552157302578853138139342116254 + +Sum of local heights: 20.724958278806425883568190939999651354005790747344365770271708408188054650719087979308774706352830957108 +global height of [11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] is 20.724958278806425883568190939999651354005790747344365770271708408188054650719087979308774706352830957108 -Sum of local heights: 1.0663587435258104788411535311564421782183835190311720105526851512244915736743902448849560352613841029545 -global height of [1794:-732:1] is 1.0663587435258104788411535311564421782183835190311720105526851512244915736743902448849560352613841029545 -Input a point on curve, [0] to finish: -Input a curve: Testing points on the curve [0,0,1,-7,6] The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] Computing their heights: -Heights are 0.99090633315308797388259855288719422818432598249311083931508337741640200828756857760393418236367133926752, 0.66820516565192793503314205088782304708129183235953495290561093851504315269673218586650086473309992408244, and 0.76704335533154620579545064655221715456242461918849090382159571937411742205666289745531823277891939649419 +Heights are 0.99090633315308797388259855288719422818432598249311083931508337741640200828756857760393418236367133926751, 0.66820516565192793503314205088782304708129183235953495290561093851504315269673218586650086473309992408244, and 0.76704335533154620579545064655221715456242461918849090382159571937411742205666289745531823277891939649419 The origin is [0:1:0] Now some additions etc,: P0 + P1 = [3:3:1] diff -Nru eclib-20190909/tests/out_ntl/tlatconst.out eclib-20210625/tests/out_ntl/tlatconst.out --- eclib-20190909/tests/out_ntl/tlatconst.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tlatconst.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,50 @@ +Table of Gamma values +--------------------- + +n Gamma(n) Gamma(n+1/2) +1 1 0.88622692545275801364908374167 +2 1 1.3293403881791370204736256125 +3 2 3.3233509704478425511840640313 +4 6 11.631728396567448929144224109 +5 24 52.342777784553520181149008492 +6 120 287.88527781504436099631954671 +7 720 1871.2543057977883464760770536 +8 5040 14034.407293483412598570577902 +9 40320 119292.46199460900708784991217 +10 362880 1133278.3889487855673345741656 +11 3628800 11899423.083962248457013028739 +12 39916800 136843365.46556585725564983049 +13 479001600 1710542068.3195732156956228812 +14 6227020800 23092317922.314238411890908896 +15 87178291200 334838609873.55645697241817899 +16 1307674368000 5189998453040.1250830724817744 +17 20922789888000 85634974475162.063870695949277 +18 355687428096000 1498612053315336.1177371791124 +19 6402373705728000 27724322986333718.178137813579 +20 121645100408832000 540624298233507504.47368736478 + + +Table of Lattice constants +-------------------------- + +n gamma_n gamma_n^n +1 1 1 +2 1.154700538379251529018297561 1.3333333333333333333333333333 +3 1.2599210498948731647672106073 2 +4 1.4142135623730950488016887242 4 +5 1.5157165665103980823472598013 8 +6 1.665366355311208639217572725 21.333333333333333333333333333 +7 1.8114473285278133431883457464 64 +8 2 256 +9 2.2406464525576100868765716641 1423.508349408712868310367206 +10 2.3732671191037974065231529926 5668.4748300339395076115877442 +11 2.5050324821876886180996625614 24375.132099876182930515702621 +12 2.6360392896474785851581370699 112569.96952826428149078806865 +13 2.7663681820140629958822583624 555686.3780545043339390013888 +14 2.8960871477658809320506009245 2919864.9741275218676690812 +15 3.0252540884894484579539012827 16271509.650379324548133062845 +16 3.1539187577277054767710128351 95853512.782427047919943311148 +17 3.2821242499009068175079523838 595162150.89011988598041576619 +18 3.4099081600142680405724628767 3884796548.556584756871179724 +19 3.5373034984903691930188147643 26593417312.002201563851069084 +20 3.6643394211493565124652803618 190508297302.56008707903465134 diff -Nru eclib-20190909/tests/out_ntl/torsion.out eclib-20210625/tests/out_ntl/torsion.out --- eclib-20190909/tests/out_ntl/torsion.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/torsion.out 2021-06-25 09:53:34.000000000 +0000 @@ -10,13 +10,13 @@ Cyclic: C2 Curve [0,0,0,0,100] has 3 torsion point(s) [0:1:0] (order 1) -[0:10:1] (order 3) [0:-10:1] (order 3) +[0:10:1] (order 3) Cyclic: C3 Curve [0,0,0,1,2] has 4 torsion point(s) [0:1:0] (order 1) -[1:-2:1] (order 4) [-1:0:1] (order 2) +[1:-2:1] (order 4) [1:2:1] (order 4) Cyclic: C4 Curve [0,0,0,-1,0] has 4 torsion point(s) @@ -27,120 +27,120 @@ Non-cyclic: C2 x C2 Curve [0,-1,1,0,0] has 5 torsion point(s) [0:1:0] (order 1) -[1:-1:1] (order 5) [0:-1:1] (order 5) [0:0:1] (order 5) +[1:-1:1] (order 5) [1:0:1] (order 5) Cyclic: C5 Curve [0,0,0,0,1] has 6 torsion point(s) [0:1:0] (order 1) -[2:-3:1] (order 6) -[0:-1:1] (order 3) [-1:0:1] (order 2) +[0:-1:1] (order 3) [0:1:1] (order 3) +[2:-3:1] (order 6) [2:3:1] (order 6) Cyclic: C6 Curve [1,-1,1,-3,3] has 7 torsion point(s) [0:1:0] (order 1) -[3:-6:1] (order 7) -[1:-2:1] (order 7) [-1:-2:1] (order 7) [-1:2:1] (order 7) +[1:-2:1] (order 7) [1:0:1] (order 7) +[3:-6:1] (order 7) [3:2:1] (order 7) Cyclic: C7 Curve [0,1,0,-14624,669300] has 8 torsion point(s) [0:1:0] (order 1) -[418:-8232:1] (order 8) +[75:0:1] (order 2) [124:-882:1] (order 4) +[124:882:1] (order 4) [82:-168:1] (order 8) -[75:0:1] (order 2) [82:168:1] (order 8) -[124:882:1] (order 4) +[418:-8232:1] (order 8) [418:8232:1] (order 8) Cyclic: C8 Curve [0,1,0,-160,308] has 8 torsion point(s) [0:1:0] (order 1) -[26:-120:1] (order 4) -[11:0:1] (order 2) -[26:120:1] (order 4) [-14:0:1] (order 2) -[-4:30:1] (order 4) [2:0:1] (order 2) +[11:0:1] (order 2) [-4:-30:1] (order 4) +[-4:30:1] (order 4) +[26:-120:1] (order 4) +[26:120:1] (order 4) Non-cyclic: C2 x C4 Curve [1,-1,1,-14,29] has 9 torsion point(s) [0:1:0] (order 1) -[9:-29:1] (order 9) -[3:-5:1] (order 9) [1:-5:1] (order 3) +[1:3:1] (order 3) [-3:-5:1] (order 9) [-3:7:1] (order 9) -[1:3:1] (order 3) +[3:-5:1] (order 9) [3:1:1] (order 9) +[9:-29:1] (order 9) [9:19:1] (order 9) Cyclic: C9 Curve [1,0,0,115,561] has 10 torsion point(s) [0:1:0] (order 1) -[70:-629:1] (order 10) -[16:-89:1] (order 5) -[4:-35:1] (order 10) -[-2:-17:1] (order 5) [-34:17:8] (order 2) +[-2:-17:1] (order 5) [-2:19:1] (order 5) -[4:31:1] (order 10) +[16:-89:1] (order 5) [16:73:1] (order 5) +[4:-35:1] (order 10) +[4:31:1] (order 10) +[70:-629:1] (order 10) [70:559:1] (order 10) Cyclic: C10 Curve [1,0,1,-19,26] has 12 torsion point(s) [0:1:0] (order 1) -[13:-52:1] (order 6) -[4:-7:1] (order 3) +[-5:2:1] (order 2) [3:-2:1] (order 2) +[14:-11:8] (order 2) +[4:-7:1] (order 3) [4:2:1] (order 3) -[13:38:1] (order 6) -[-5:2:1] (order 2) +[-2:-7:1] (order 6) [-2:8:1] (order 6) -[1:2:1] (order 6) -[14:-11:8] (order 2) [1:-4:1] (order 6) -[-2:-7:1] (order 6) +[1:2:1] (order 6) +[13:-52:1] (order 6) +[13:38:1] (order 6) Non-cyclic: C2 x C6 Curve [1,0,0,-1070,7812] has 16 torsion point(s) [0:1:0] (order 1) -[244:-3902:1] (order 8) -[64:-482:1] (order 4) -[34:-122:1] (order 8) -[28:-14:1] (order 2) -[34:88:1] (order 8) -[64:418:1] (order 4) -[244:3658:1] (order 8) [-36:18:1] (order 2) -[-26:148:1] (order 8) -[-8:130:1] (order 4) -[4:58:1] (order 8) +[28:-14:1] (order 2) [62:-31:8] (order 2) -[4:-62:1] (order 8) [-8:-122:1] (order 4) +[-8:130:1] (order 4) +[64:-482:1] (order 4) +[64:418:1] (order 4) [-26:-122:1] (order 8) +[-26:148:1] (order 8) +[4:-62:1] (order 8) +[4:58:1] (order 8) +[34:-122:1] (order 8) +[34:88:1] (order 8) +[244:-3902:1] (order 8) +[244:3658:1] (order 8) Non-cyclic: C2 x C8 Curve [1,0,0,-372368141774940800,87459461608665181808640000] has 16 torsion point(s) [0:1:0] (order 1) -[654296320:-11132578294400:1] (order 8) -[369088000:-549923580800:1] (order 4) -[353359600:-34032060800:1] (order 8) +[352179456:-176089728:1] (order 2) [352441600:-176220800:1] (order 2) -[353359600:33678701200:1] (order 8) -[369088000:549554492800:1] (order 4) -[654296320:11131923998080:1] (order 8) [-5636968450:2818484225:8] (order 2) -[117433600:6734213027200:1] (order 8) -[335795200:532525225600:1] (order 4) -[351262480:33612641920:1] (order 8) -[352179456:-176089728:1] (order 2) -[351262480:-33963904400:1] (order 8) [335795200:-532861020800:1] (order 4) +[335795200:532525225600:1] (order 4) +[369088000:-549923580800:1] (order 4) +[369088000:549554492800:1] (order 4) [117433600:-6734330460800:1] (order 8) +[117433600:6734213027200:1] (order 8) +[351262480:-33963904400:1] (order 8) +[351262480:33612641920:1] (order 8) +[353359600:-34032060800:1] (order 8) +[353359600:33678701200:1] (order 8) +[654296320:-11132578294400:1] (order 8) +[654296320:11131923998080:1] (order 8) Non-cyclic: C2 x C8 Curve [0,0,0,-4/9,0] has 4 torsion point(s) [0:1:0] (order 1) diff -Nru eclib-20190909/tests/out_ntl/tsat2.out eclib-20210625/tests/out_ntl/tsat2.out --- eclib-20190909/tests/out_ntl/tsat2.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tsat2.out 2021-06-25 09:53:34.000000000 +0000 @@ -3,57 +3,17 @@ 24129r1 = [0,0,1,-68799,-1969790] 2 points entered:[ [-1870:9257:8] [-197:1984:1] ] +Saturation index bound (for points of good reduction) = 4 +Tamagawa index primes are [ 2 5 ] +adding Tamagawa index prime 5 to saturation list +Checking saturation at [ 2 3 5 ] Checking 2-saturation -Points have successfully been 2-saturated (max q used = 17) +Points were proved 2-saturated (max q used = 17) Checking 3-saturation -Points have successfully been 3-saturated (max q used = 37) +Points were proved 3-saturated (max q used = 37) Checking 5-saturation -Points have successfully been 5-saturated (max q used = 73) -Checking 7-saturation -Points have successfully been 7-saturated (max q used = 37) -Checking 11-saturation -Points have successfully been 11-saturated (max q used = 311) -Checking 13-saturation -Points have successfully been 13-saturated (max q used = 23) -Checking 17-saturation -Points have successfully been 17-saturated (max q used = 29) -Checking 19-saturation -Points have successfully been 19-saturated (max q used = 163) -Checking 23-saturation -Points have successfully been 23-saturated (max q used = 461) -Checking 29-saturation -Points have successfully been 29-saturated (max q used = 883) -Checking 31-saturation -Points have successfully been 31-saturated (max q used = 137) -Checking 37-saturation -Points have successfully been 37-saturated (max q used = 211) -Checking 41-saturation -Points have successfully been 41-saturated (max q used = 263) -Checking 43-saturation -Points have successfully been 43-saturated (max q used = 727) -Checking 47-saturation -Points have successfully been 47-saturated (max q used = 109) -Checking 53-saturation -Points have successfully been 53-saturated (max q used = 307) -Checking 59-saturation -Points have successfully been 59-saturated (max q used = 601) -Checking 61-saturation -Points have successfully been 61-saturated (max q used = 127) -Checking 67-saturation -Points have successfully been 67-saturated (max q used = 443) -Checking 71-saturation -Points have successfully been 71-saturated (max q used = 151) -Checking 73-saturation -Points have successfully been 73-saturated (max q used = 1181) -Checking 79-saturation -Points have successfully been 79-saturated (max q used = 809) -Checking 83-saturation -Points have successfully been 83-saturated (max q used = 1249) -Checking 89-saturation -Points have successfully been 89-saturated (max q used = 2017) -Checking 97-saturation -Points have successfully been 97-saturated (max q used = 2351) -Finished p-saturation for p up to 100, points were saturated +Points were proved 5-saturated (max q used = 73) +Finished p-saturation, points were saturated =============================================================== diff -Nru eclib-20190909/tests/out_ntl/tsat3.out eclib-20210625/tests/out_ntl/tsat3.out --- eclib-20190909/tests/out_ntl/tsat3.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tsat3.out 2021-06-25 09:53:34.000000000 +0000 @@ -5,10 +5,10 @@ Input non-torsion points: [ [-1870:9257:8] [-197:1984:1] ] Input torsion points: [ ] Saturation complete --input points were saturated -Generator 1 is [-1870:9257:8]; height 2.0083871151269007291034854397091367536767105479774128539898353250932092129117976535078116672858349234404 -Generator 2 is [-197:1984:1]; height 0.18240478738536152619143455673736975152252583144889277600808258861554122550560811067674427070655341417481 +Generator 1 is [-1870:9257:8]; height 2.0083871151269007291034854397 +Generator 2 is [-197:1984:1]; height 0.18240478738536152619143455674 -Regulator = 0.28891907499740315117172793738173985118554508279102044950288429716198941948959459794594173942471204974756 +Regulator = 0.28891907499740315117172793739 24129 18 1 [0,0,1,-68799,-1969790] 2 [-1870:9257:8] [-197:1984:1] ============================================================== @@ -19,10 +19,10 @@ Input non-torsion points: [ [-178:299:8] [-23748:-59351:1728] ] Input torsion points: [ [34:-17:1] [-10:5:1] ] Saturation complete --input points were saturated -Generator 1 is [-178:299:8]; height 4.6929258797812327543577096897722572651109503920305671320311044080500037420752795920449440915256171762878 -Generator 2 is [-23748:-59351:1728]; height 6.9948553142437901997940849255296542740117904033941802221783125264370095464278668886218531865534165628083 +Generator 1 is [-178:299:8]; height 4.6929258797812327543577096898 +Generator 2 is [-23748:-59351:1728]; height 6.9948553142437901997940849255 -Regulator = 32.793309684572014438912548031035002981331807318295898123785044562915830559227037136500689319454770705583 +Regulator = 32.793309684572014438912548031 133507 b 2 [1,-1,0,-898,-7905] 2 [-178:299:8] [-23748:-59351:1728] ============================================================== diff -Nru eclib-20190909/tests/out_ntl/tsatbnd.out eclib-20210625/tests/out_ntl/tsatbnd.out --- eclib-20190909/tests/out_ntl/tsatbnd.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tsatbnd.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,172 @@ +====================================================== + +E = [0,0,1,-7,36] +4 points entered: +[1:-6:1] (height 1.6349748928639427433912346865) +[-30:21:8] (height 3.2314398318025205249814387186) +[-3:5:1] (height 1.8051880666153947782569419431) +[-2:6:1] (height 1.7512018533833741083102767996) +Regulator of input points: 3.3063784745913055160929273361 +Subgroup of EGR points has index 1 + + Images of points in component groups at bad primes and R + +p Group Image(s) +545723 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] +R [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] + +Global Tamagawa number: 1 +Global Tamagawa exponent: 1 +lower height bound (egr points): 0.21022410381342863575778136906 +bound on saturation index (egr points): 82 +lower height bound (all points): 0.21022410381342863575778136906 +bound on saturation index (all points): 82 +====================================================== + +E = [1,1,1,-218325338,-1241755642969] +1 points entered: +[52725:11541787:1] (height 7.3905747176836140279287903443) +Regulator of input points: 7.3905747176836140279287903443 +Subgroup of EGR points has index 6 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 6 ] [ 2 ] +3 [ 2 ] [ 1 ] +5 [ 4 ] [ 2 ] +7 [ 1 ] [ 0 ] +17 [ 1 ] [ 0 ] +43 [ 1 ] [ 0 ] +R [ 2 ] [ 0 ] + +Global Tamagawa number: 96 +Global Tamagawa exponent: 12 +lower height bound (egr points): 0.84317631672419664796432298771 +bound on saturation index (egr points): 17 +lower height bound (all points): 0.0058553910883624767219744651925 +bound on saturation index (all points): 35 +====================================================== + +E = [0,0,1,-23737,960366] +8 points entered: +[36:390:1] (height 4.9361653636229264429376338091) +[-87:1538:1] (height 5.350421534561939113440960756) +[181:1610:1] (height 5.3726790325808126194074889629) +[-159:845:1] (height 5.51138405123110174136087036) +[-29:1274:1] (height 5.186753578413399282082532573) +[-11005:192282:125] (height 8.5719034126843733282338758998) +[-3021:40175:27] (height 7.6074992975744923251011004698) +[10532:78629:64] (height 8.0608521192641240532924901594) +Regulator of input points: 260586.99720495370890427160378 +Subgroup of EGR points has index 2 + + Images of points in component groups at bad primes and R + +p Group Image(s) +457532830151317 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +R [ 2 ] [ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ] + +Global Tamagawa number: 2 +Global Tamagawa exponent: 2 +lower height bound (egr points): 4.8453850861058816557151019275 +bound on saturation index (egr points): 29 +lower height bound (all points): 1.2113462715264704139287754819 +bound on saturation index (all points): 3793 +====================================================== + +E = [0,1,0,-3532341,2671895459] +1 points entered: +[-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] (height 200.11614623735196412520764022) +Regulator of input points: 200.11614623735196412520764022 +Subgroup of EGR points has index 2 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 1 ] [ 0 ] +5 [ 1 ] [ 0 ] +7 [ 1 ] [ 0 ] +41 [ 2 2 ] [ 1 0 ] +R [ 1 ] [ 0 ] + +Global Tamagawa number: 2 +Global Tamagawa exponent: 2 +lower height bound (egr points): 1.4668632445206274496218150367 +bound on saturation index (egr points): 23 +lower height bound (all points): 0.36671581113015686240545375916 +bound on saturation index (all points): 23 +====================================================== + +E = [0,1,1,-9872,374262] +4 points entered: +[57:0:1] (height 1.0498013827768001207241015434) +[56:13:1] (height 1.934198495189080558266052584) +[458:19:8] (height 2.7881011029218950258294536227) +[36:-259:1] (height 3.5740919517758305527160893622) +Regulator of input points: 13.995472891083440653774320287 +Subgroup of EGR points has index 1 + + Images of points in component groups at bad primes and R + +p Group Image(s) +24191611 [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] +R [ 1 ] [ 0 ][ 0 ][ 0 ][ 0 ] + +Global Tamagawa number: 1 +Global Tamagawa exponent: 1 +lower height bound (egr points): 0.025163911436707098565305010427 +bound on saturation index (egr points): 11816 +lower height bound (all points): 0.025163911436707098565305010427 +bound on saturation index (all points): 11816 +====================================================== + +E = [0,1,0,-19357973048906456166239827272707359553313344,21187731957757821187375878909257489490487412099497964528006317056] +12 points entered: +[11376724821019368394185473144824:531128848935479591898724774494856605576120:2212245127] (height 20.72495827880642588356819094) +[7623939119367566734712416:221638196641185505905607878680125440:6859] (height 22.408810521229377300789725156) +[36426251939262077044010523050021856:1440660184888000534262415597113906110443804160:7723644690663] (height 28.213818287160612389821916159) +[-2374492566122734660340122:529890342210233698629090661148812455:2744] (height 25.262656286423319502646655345) +[133315763430614733564506995979036000:12052050702684033030644774922369112945461998208:13452404189687] (height 26.065344483854759949872060941) +[-736456133932085217609486905120:65252742580786613608001616883511206150656:281011375] (height 18.549337908829374081613273099) +[-595772851387421768949418976:167161309967794524103557005329392387840:912673] (height 27.346838711032488668750614154) +[6022489089748785062867974730217810:556978335673856277257836463329999151388906387:588059226152] (height 31.238508420371796120945604319) +[-14469357974751181338226317055916720:4882855888975145618903473912921126613023223376:27655941287521] (height 27.922856002931459820899095934) +[401117760561576371833764564008128488352:9772673504421360502054799343252140728954874846976:98542628343088957] (height 28.927471674017823708763203918) +[289759090016726210750821602762394720:4585180501130133566892803635614473034268791168:75274392943567] (height 26.081232007993861502562570226) +[147460739409404501162213937304:6903716310575347660155145984848699291480:143055667] (height 28.763360826153868438542566456) +Regulator of input points: 165496855732751.12575169679605 +Subgroup of EGR points has index 12582912 + + Images of points in component groups at bad primes and R + +p Group Image(s) +2 [ 16 ] [ 1 ][ 8 ][ 7 ][ 0 ][ -5 ][ 7 ][ -6 ][ 0 ][ -2 ][ -6 ][ 5 ][ 1 ] +3 [ 12 ] [ -5 ][ 4 ][ 0 ][ -5 ][ 1 ][ 3 ][ -5 ][ 0 ][ -4 ][ 3 ][ 3 ][ -2 ] +7 [ 4 ] [ 2 ][ 2 ][ 0 ][ 0 ][ 1 ][ 2 ][ 2 ][ 2 ][ 1 ][ 0 ][ 0 ][ 1 ] +13 [ 4 ] [ 2 ][ 2 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ][ 2 ][ 2 ][ 2 ] +29 [ 2 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ] +31 [ 4 ] [ 1 ][ 1 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ][ 1 ][ 2 ][ 1 ][ 2 ][ 1 ] +43 [ 2 ] [ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ] +73 [ 2 ] [ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ] +79 [ 4 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 1 ] +83 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +89 [ 2 ] [ 0 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 1 ] +151 [ 2 ] [ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +199 [ 2 ] [ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 1 ] +239 [ 4 ] [ 0 ][ 2 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ] +263 [ 4 ] [ 0 ][ 0 ][ 2 ][ 2 ][ 1 ][ 1 ][ 2 ][ 1 ][ 0 ][ 1 ][ 2 ][ 0 ] +601 [ 4 ] [ 2 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 1 ][ 2 ][ 2 ][ 1 ][ 2 ][ 1 ] +617 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ] +1433 [ 2 ] [ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ][ 0 ] +3449 [ 2 ] [ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ] +6199 [ 2 ] [ 1 ][ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 0 ] +1607849 [ 2 ] [ 1 ][ 0 ][ 0 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ][ 1 ][ 1 ][ 1 ][ 0 ] +R [ 2 ] [ 0 ][ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 1 ][ 0 ][ 1 ][ 0 ][ 0 ][ 1 ] + +Global Tamagawa number: 25769803776 +Global Tamagawa exponent: 48 +lower height bound (egr points): 49.659667113944377632502217479 +bound on saturation index (egr points): 3621299 +lower height bound (all points): 0.02155367496264946945855130967 +bound on saturation index (all points): 43050497269923094561 diff -Nru eclib-20190909/tests/out_ntl/tsat.out eclib-20210625/tests/out_ntl/tsat.out --- eclib-20190909/tests/out_ntl/tsat.out 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tsat.out 2021-06-25 09:53:34.000000000 +0000 @@ -1,12 +1,66 @@ -verbose (0/1)? -Input a curve: Curve [0,0,1,-7,36] -enter number of points: - enter point 1 : - enter point 2 : - enter point 3 : - enter point 4 : 4 points entered. -prime p to saturate at? -Saturating at prime 11 +====================================================== + +E = [0,0,1,-7,36] +4 points entered. + +Saturating at primes from 3 up to 31 Original generators: [ [1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] ] -Finished p-saturation for p = 11, points were saturated +Finished saturation +Saturation was successful: points were saturated. +====================================================== + +E = [0,1,1,-5203683874,-144483976270257] +1 points entered. + +Saturating at all primes +Original generators: +[ [2168251995411655778450807625109071458038066424045439264804487113928192266016020816172218469959472732741510882314178322295331571822203868759614460527408393291040333261244844673953396751473422476995056323999281244426790658741733680090138250308642118792275475439143640175842859841861264637794519698266643177065819124073183662609282196450269581232530177580634465414842216528373420323470390660256872979658885631514035518348207869636806327533508766676916684354545201633207996298998579901677851243624161746589199279061505874565140912014693702028364739260393363418410011798145756316894322963444249147617189658773074116491868653410041586711402977569904300351653936563902996379791449084233231227444059282985855021708597859154178410390445730153459861205321644159930738153044138358534665941126919788270822023659547507189517953043121524084072826640534204404300472862720958811506286038768947221129351368146095020133206527850215213950359031199486169574626580562846695046144828938927639571527184357435976547650233355430910696272506250710136450456894613228631694103703933128788483928479939687032487589013851132850684009952593048445016939728828366898294158020628858754314743175045687398921901306570682458345426806628575823818801710206865420359781674525597354384674535648163829019093957749883277798097159017005089757478115510067535309286959737817694716226665304123810921822327337505528034993000293784222380300988272288056564997643480032615147394559721279318718817658651213353867153113663308446804249733068918074852208587161776863336775478249305395428139272514254338938661523728115109079983135497074135741902177177999604848710924039842168027670793487422571666903905642786384352531734076733827122457553483648925141026837037509914027412169473693596906535856646397352311187868483922299889317614661572418967877218341775885698055825924594384826053641479194295243865238745227804689351553427105421391182502920232922502107626301181580631476235655118267512131848224089397881897391106797316846696863657121327359364921363885951494291129789263590516609433357442753979175746253392335248115963358563519225104124856975885085451153634415758609794618675169641380964085177770283733146557710513935065334084:364654369939587648906030762497183160109799932520650058473363052219001308473384490911706405327718697981247451098615982520199645970933830586030154221168571970479695728142576529636749368000968999430831418040633283507293148166400111964336132329693370563941243608304103118635763763871473320114434276900544107964277568511975569658271003516219748148962844792223712916904487152552673353199810409466086477926873859617492908007285811437488882628561671691938468841363705905046933159244012880659388085232633048536202972626384696337309510755341270174064849639232837560473077424191232713145537795992525229024094819288602358958183748275795826931290827850214181121003836714105128411417440027360841694561297046489151577185815004853653631309769452368745405178134574583216805407905563485825129714243040090535269494424068589987051547149416660798406980488525645025986822101607825558083463402728332177661751209357299930496711314336935733168117194205776152965289683798092995859473722642449236990940585291388058223677341808671604826854635264579205902337879123696848135422385086381954572327211150858524979066980117300089224757572813696508036079332096754879164681400594143712362513751637672178645631852441401005600560911657194060598416805555184766414632445213502160447629146507421544326076124685348273636380749382590469323037537456798790010911484256990362805352466003316143078595248039148429507096280144630620875465771714123525979480680262191956249492812343264974653172764673582375973200128237268233497010078416360077157636217916142154902156819759441964369767958125349092784887195111965076637610415036710299856528153841184036406257551853851922646605007420623465848209535215803147916346137362582569449990535986732389047591523922915380971466539014735487552659653072536572946791807698597843296032353968427432951509410199484240933117920377862676413312501322519112790523947235328179692810649587946704912790592260617330237158584048655547875279955969751372773326857438357176395050456576464438439737011718767378163589134288534627690726556343761315341705359551358313620563682865101664670378036299702780398110693067880348806438123817052382898219452382009080152124622107344593030316661775018429035194563637:22317970971443875510611416101670014063668929622831105713401848353385316357833502476650169666238609506087380683653752861251316718941551021529634676318722856804562481981038783704965926981894188040424793490282253199818654113403299652411766586893637130844237556802191193881748289829318453568155519369817072879478501421977458952245825208377187676830481519728613877718488541152862443312019160701652096030025286262868295333293751809263461353455807780736830633364090387805457788263561273442847931501904840605662223721447538164697728515638037749354408496834998174519425164118860754125696257929015927953548312475428447961050159177374010733123196007769087605301025246657294061092368609497376968037727428713097507568320128441337346419127591378252085508742928012408809501754062842882357521616608671649298326924215970513443763734062770550920194398575831413358255150966255520164344717795011990002273655966510824703682564440820960177925281111050129305897235397125605146890531611594301654186908799443341871309270068544156774169133478879354536191604826212655718599503438362386780457393969122515706195169781384450157732458404828323791884576526004489890287644901077681404407444887681900211255249512230135643352114304013678172359997357266565904381267131107054586136520020807774895620583325622322681098811178059391982810861776666746192636631001776990384773431454306089061617574732768003979548756136864641554986647906209140690447324944012868613604026983320395301550962373816762107139737362463100989048640283782005683054645760529775838499173716253816568567111603337493700682263305947769200140004766794916642737838354166541364524503235736628923596537336119435817755486308384581248453905226595195854109627329816846782215641144505332763667376790836435296624214901500770801446403123588601822008055568995437059758200758821882232217656317711713252479536512494090275474267650910103053541521776292425133116980377726105030951104026007449281506890788218298119670232955279031318796075303045843728647357475338352902001496140017154422025945974039589898173587384356313154052740510594785527806175232165610851643753950815807169507656504384856287060143893491226759270952136509949484652111617488637731392] ] +Finished saturation +Saturation was successful: index gain = 3. +New generators: +[ [14986931173003228760840414871852147976607848645984618771104488093465357235642483249101234369962329540628919747143492328836904844320646997239288269963796421809427854486303981435632275267326817136749482009612149433561486268353477221552938476:-8205452548669931425705662808214708011821779110339621586064377914222134830813388165142677106884964627346340262024523431333472092215913380577041636064958499079740946069243644115846523745688777100788896240083781545430792294999410644569703090411:47190886885240830168837111305250498473924214069702508468798179087586425058508758403484988744208755837410257773968837300792812547048121267314170386019423120462260202132768315652146750448168154355407626076374835919868144957186286895808] ] +====================================================== + +E = [1,1,1,-218325338,-1241755642969] +1 points entered. + +Saturating at all primes +Original generators: +[ [52725:11541787:1] ] +Finished saturation +Saturation was successful: points were saturated. +====================================================== + +E = [0,0,1,-23737,960366] +8 points entered. + +Saturating at all primes +Original generators: +[ [36:390:1] [-87:1538:1] [181:1610:1] [-159:845:1] [-29:1274:1] [-11005:192282:125] [-3021:40175:27] [10532:78629:64] ] +Finished saturation +Saturation was successful: index gain = 5. +New generators: +[ [36:390:1] [-87:1538:1] [181:1610:1] [7046:-2067064:2197] [-29:1274:1] [-11005:192282:125] [-3021:40175:27] [10532:78629:64] ] +====================================================== + +E = [0,1,0,-3532341,2671895459] +1 points entered. + +Saturating at primes from 3 up to 3 +Original generators: +[ [-70530065697753731555722521380451694847027684946481619207066358883190994719487509574998052510855059423334984274230836976431876403642:200898144915891992877832706966832248880788948705776913304828657795482993310179952832361429299128720575547455788810135494156109029455:32383162777362251978562757665550366176161600539636371030636031896984923251479838151766462063041425141567992375986724367103348073] ] +Finished saturation +Saturation was successful: index gain = 3. +New generators: +[ [2039080769383242:43530702836852015:1260762051627] ] +====================================================== + +E = [0,1,1,-9872,374262] +4 points entered. + +Saturating at primes from 1 up to 211 +Original generators: +[ [57:0:1] [56:13:1] [458:19:8] [36:-259:1] ] +Finished saturation +Saturation was successful: points were saturated. diff -Nru eclib-20190909/tests/out_ntl/tversion.out eclib-20210625/tests/out_ntl/tversion.out --- eclib-20190909/tests/out_ntl/tversion.out 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/out_ntl/tversion.out 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,12 @@ +This eclib version is 20210625 +[ year month day ] = [ 2021 6 25 ] + +Configure options and compilation date: + +eclib version 20210625, using NTL bigints and NTL real and complex multiprecision floating point + +Testing comparison of version date and various (year, month, day) date triples: + +Date 20200101 is before the version date 20210625 +Date 20300611 is after the version date 20210625 +Date 20210317 is before the version date 20210625 diff -Nru eclib-20190909/tests/smattest.cc eclib-20210625/tests/smattest.cc --- eclib-20190909/tests/smattest.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/smattest.cc 2021-06-25 09:53:34.000000000 +0000 @@ -476,12 +476,31 @@ cout << "standard : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in standard!!!";*****/ - smat ker = A.kernel(pc,npc); + + smat kern = A.kernel(pc,npc); cout << "rank is:" << dim( pc ) << endl; - display_population(ker); - smat result = mult_mod_p(sm,ker,DEFAULT_MODULUS); + display_population(kern); + + // smat_elim A2( sm ); + // smat oldkern = A2.old_kernel(pc, npc); + // cerr << "old version "; + // cout << "rank is:" << dim( pc ) << endl; + // display_population(oldkern); + // cerr << "old kernel basis:\n" << oldkern.as_mat() < #include +#include int main() { - // set_precision("Enter precision in bits"); initprimes("PRIMES",0); Curve E(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); - Curvedata C(E); + Curvedata C(E, 0); cout << "Curve " << E << endl; - cout<<"Division Poly (2) = \t"< nn = {2,3,5,7}; + for(vector::iterator n = nn.begin(); n!=nn.end(); n++) + { + i = *n; + cout << "n = " << i << ":\n"; + cout<<"Numerator: \t" << mul_by_n_num(a1,a2,a3,a4,a6,i) << endl; + cout<<"Denominator:\t" << mul_by_n_den(a1,a2,a3,a4,a6,i) << endl; + } + +#if(1) + cout << "\nTesting division of points:\n"; + + Point P0(C, BIGINT(0),BIGINT(2)) ; + Point P1(C, BIGINT(1),BIGINT(0)) ; + Point P2(C, BIGINT(2),BIGINT(0)) ; + + vector Plist = {P0, P1, P2, P0+P1, P0+P2, P1+P2, P0+P1+P2}; + vector mlist = {2,3,5,7,11,13}; + for (vector::iterator Pi = Plist.begin(); Pi!=Plist.end(); Pi++) + { + Point P = *Pi; + cout << "\nP = " << P << endl; + for (vector::iterator mi = mlist.begin(); mi!=mlist.end(); mi++) + { + int m = *mi; + Point Q = m*P; + vector newP = Q.division_points(m); + cout << m << "*P = " << Q << ", divided by " << m << " gives back "; + if (newP.size()==1 && newP[0]==P) + { + cout << "P, OK" << endl; + } + else + { + cout << newP << "???" << endl; + } + } + } +#endif } diff -Nru eclib-20190909/tests/tegr.cc eclib-20210625/tests/tegr.cc --- eclib-20190909/tests/tegr.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/tegr.cc 2021-06-25 09:53:34.000000000 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,8 @@ cin >> N; if(N==0) exit(0); cin >> nclass >> ncurve; cin >> E; - Curvedata C(E); + Curvedata C(E, 0); + CurveRed CR(C); cout<>E, !E.isnull()) + while (cerr<<"Input a curve: ", cin>>E, !E.isnull()) { Curvedata C(E, 0); - cout<<"Curve "<< C < badp = getbad_primes(C); + Curvedata Emin = C.minimalize(u,r,s,t); + int is_min = is_one(abs(u)); // then E was already minimal, no adjustments needed + if(!is_min) + { + cout<<"Input curve is not minimal at "<> P, !(!cin)&& P.isvalid() ) - { + { cout << "Point " << P; - int ord = order(P); - if(ord>0)cout<< " has order " << ord; + int ord = order(P); + if(ord>0)cout<< " has order " << ord; else cout<< " has infinite order"; cout << endl; + Point Pmin = (is_min? P: transform(P, &Emin, u, r, s, t)); + cout << "Local heights:\n"; bigfloat gh = to_bigfloat(0); - bigint d = gcd(P.getZ(),P.getX()); + bigint d = gcd(Pmin.getZ(),Pmin.getX()); vector pdivsz=pdivs(d); vector::iterator qvar = pdivsz.begin(); while(qvar!=pdivsz.end()) { bigint q = *qvar++; cout << q << ":\t\t" << flush; - bigfloat ph = pheight(P,q); + bigfloat ph = pheight(Pmin,q); gh+=ph; cout << ph << endl; } @@ -74,28 +84,33 @@ bigint pr = *pvar++; if(div(pr,d)) continue; cout << pr << ":\t\t" << flush; - bigfloat ph = pheight(P,pr); + bigfloat ph = pheight(Pmin,pr); gh+=ph; cout << ph << endl; } cout << "Sum so far =\t" << gh << endl; - bigfloat rh = realheight(P); + bigfloat rh = realheight(Pmin); cout << "R:\t\t" << rh << endl; gh += rh; cout << "\nSum of local heights: " << gh << endl; -// -// N.B. The call to height() calls realheight() and pheight() again, -// since as height() was not called earlier, P's height field was -// not set. -// + + // + // N.B. The call to height() calls realheight() and pheight() again, + // since as height() was not called earlier, P's height field was + // not set. + // + // N.B. Computing the global height automatically handles + // the move to a minimal model, so height(P) and + // height(Pmin) are the same cout<<"global height of "< + +int main(){ +#ifdef MPFP + set_precision(100); +#endif + initprimes("PRIMES",0); + + cout << "Table of Gamma values\n"; + cout << "---------------------\n\n"; + + long n; + cout << "n\tGamma(n)\tGamma(n+1/2)\n"; + for (n=1; n<=20; n++) + cout << n << "\t" << Gamma_n(n) << "\t" << Gamma_n_plus_half(n) << endl; + + cout << "\n\n"; + + cout << "Table of Lattice constants\n"; + cout << "--------------------------\n\n"; + + cout << "n\tgamma_n\tgamma_n^n\n"; + for (n=1; n<=20; n++) + { + bigfloat gam = lattice_const(n); + cout << n << "\t" << gam << "\t" << power(gam,n) << endl; + } + return 0; +}// end main() + diff -Nru eclib-20190909/tests/tmanin.cc eclib-20210625/tests/tmanin.cc --- eclib-20190909/tests/tmanin.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/tmanin.cc 2021-06-25 09:53:34.000000000 +0000 @@ -57,9 +57,9 @@ cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; + while (n>1) { cout<<"Enter level: "; cin>>n; #endif - if (n>0) + if (n>1) { cout << "\n>>>Level " << n; if(verbose)cout<> verbose; // cout << "Plus space (0/1)? "; cin >> plus; - while (cout<<"Enter level: ", cin>>n, n>0) + while (cout<<"Enter level: ", cin>>n, n>1) { cout << ">>>Level " << n << "\t"; homspace hplus(n,plus,0,0); diff -Nru eclib-20190909/tests/tsat2.cc eclib-20210625/tests/tsat2.cc --- eclib-20190909/tests/tsat2.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/tsat2.cc 2021-06-25 09:53:34.000000000 +0000 @@ -37,11 +37,11 @@ #include #define PMIN 2 -#define PMAX 100 +#define PMAX -1 int main() { - set_precision(300); + set_precision(100); initprimes("PRIMES",0); int verbose = 1; // cout<<"verbose (0/1)? "; cin >>verbose; @@ -61,7 +61,7 @@ cin >> E; curvecount++; - Curvedata C(E); + Curvedata C(E, 0); saturator sieve(&C,verbose); cout< unsat; sieve.set_points(points); - int index = sieve.do_saturation_upto(pmax); + int ok = sieve.saturate(unsat, index, pmax, 2, 1); - cout<<"Finished p-saturation for p up to "<1) + cout<<"Finished p-saturation"; + if (pmax!=-1) + cout << "for p up to "<1) { cout<<", index gain = "< newpoints = sieve.getgens(); diff -Nru eclib-20190909/tests/tsat3.cc eclib-20210625/tests/tsat3.cc --- eclib-20190909/tests/tsat3.cc 2019-09-09 14:00:15.000000000 +0000 +++ eclib-20210625/tests/tsat3.cc 2021-06-25 09:53:34.000000000 +0000 @@ -37,7 +37,7 @@ #include #define USE_EGR -#define SAT_BND 100000 // saturation bound: use -1 for global default +#define SAT_BND -1 // saturation bound, or 1 for automatic #ifdef USE_EGR const int use_egr=1; @@ -54,11 +54,11 @@ { #ifdef MPFP // set_precision("Enter precision in bits"); - set_precision(350); + set_precision(100); #endif initprimes("PRIMES",0); int verbose = 0; - // cout<<"verbose (0/1)? "; cin >>verbose; + cerr<<"verbose (0/1)? "; cin >>verbose; int j, npts; long N, ncurve, nclass; @@ -78,7 +78,7 @@ #endif cin >> ncurve; cin >> E; - Curvedata C(E); + Curvedata C(E, 0); cout< unsatprimes; int success = 1; if (npts) { - success = saturate_points(C, points, index, unsatprimes, SAT_BND, use_egr, (verbose)); + success = saturate_points(C, points, index, unsatprimes, SAT_BND, 2, use_egr, (verbose)); } if(success) diff -Nru eclib-20190909/tests/tsatbnd.cc eclib-20210625/tests/tsatbnd.cc --- eclib-20190909/tests/tsatbnd.cc 1970-01-01 00:00:00.000000000 +0000 +++ eclib-20210625/tests/tsatbnd.cc 2021-06-25 09:53:34.000000000 +0000 @@ -0,0 +1,139 @@ +// tsatbnd.cc -- test saturation index bound +////////////////////////////////////////////////////////////////////////// +// +// Copyright 1990-2012 John Cremona +// +// This file is part of the eclib package. +// +// eclib is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2 of the License, or (at your +// option) any later version. +// +// eclib is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License +// along with eclib; if not, write to the Free Software Foundation, +// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +// +////////////////////////////////////////////////////////////////////////// +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +//#include +//#include + + +int main() +{ + // set_precision("Enter precision in bits"); + set_precision(100); + initprimes("PRIMES",0); + int verbose = 1; + cerr<<"verbose (0/1)? "; cin >>verbose; + int j, npts; + + Curvedata C; + + while (getcurve(C, verbose)) + { + + cout << "======================================================\n\n"; + cout << "E = " << (Curve)C <> npts; + vector points; points.reserve(npts); + j=0; + while(j> P; + if ( P.isvalid() ) + { + points.push_back(P); + j++; + } + else + { + cerr<<"point "<::iterator Pi=points.begin(); Pi!=points.end(); Pi++) + { + P = *Pi; + cout << P << " (height "< points_min; + for (vector::const_iterator Pi = points.begin(); Pi!=points.end(); Pi++) + points_min.push_back(transform(*Pi, &Cmin, u, r, s, t)); + + CurveRed CR(Cmin); + vector plist = getbad_primes(CR); + ComponentGroups CG(CR); + vector > ims; + bigint p; + for(vector::iterator pi=plist.begin(); pi!=plist.end(); pi++) + { + p=*pi; + cout< >::iterator im=ims.begin(); im!=ims.end(); im++) + cout<<(*im); + cout< >::iterator im=ims.begin(); im!=ims.end(); im++) + cout<<(*im); + cout< #include #include +#include #include #include #include @@ -46,88 +47,97 @@ int main() { // set_precision("Enter precision in bits"); - set_precision(600); + set_precision(100); initprimes("PRIMES",0); int verbose = 1; - cout<<"verbose (0/1)? "; cin >>verbose; + cerr<<"verbose (0/1)? "; cin >>verbose; int j, npts; - /* test curve - Curve E(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); + // Curve E; + // cout<<"\nInput a curve: "; cin >> E; + // Curvedata C(E); + // cout << "Curve " << E << endl; - Curvedata C(E); - cout << "Curve " << E << endl; - - vector PP; - Point P1(C,2,0,1); - Point P2(C,-1,3,1); - Point P3(C,4,6,1); - PP.push_back(P1); - PP.push_back(3*P2+P1); - PP.push_back(P3); - cout << "Points " << PP << endl; - */ - - Curve E; - cout<<"\nInput a curve: "; cin >> E; - Curvedata C(E); - cout << "Curve " << E << endl; - saturator sieve(&C,verbose); + Curvedata C; + while (getcurve(C, verbose)) + { + + cout << "======================================================\n\n"; + cout << "E = " << (Curve)C <> npts; + cerr<<"enter number of points: "; cin >> npts; vector points; points.reserve(npts); j=0; while(j> P; if ( P.isvalid() ) {points.push_back(P); j++;} - else {cout<<"point "<>pmax; - pmax = NextPrime(pmax); - cout<<"\nSaturating at prime "<1) + cerr<<"minimum prime p to saturate at (or 0)? ", cin>>pmin; + cerr<<"maximum prime p to saturate at (or -1 for automatic)? ", cin>>pmax; + if (pmax>0) + { + pmax = NextPrime(pmax); + cout<<"\nSaturating at primes from " <2) cout << " from " <0) { - cout<<", index gain = "< newpoints = sieve.getgens(); - cout<<"New generators:\n"<1) + { + cout<<" index gain = "< newpoints = sieve.getgens(); + cout<<"New generators:\n"< +#include + +int main( int argc, char **argv ) +{ + cout << "This eclib version is " << eclib_version() << endl; + vector date = eclib_date(); + cout << "[ year month day ] = " << date << endl; + + cout << "\nConfigure options and compilation date:\n" << endl; + show_version(); + + cout << "\nTesting comparison of version date and various (year, month, day) date triples:\n" << endl; + // test version date comparison + int y, m, d, s; + y=2020; m=1; d=1; + s = compare_eclib_version(y,m,d); + cout << "Date "; + cout << setw(4)<0) cout << "before"; else + if (s<0) cout << "after"; else + cout << "the same as"; + cout << " the version date "; + cout << setw(4)<0) cout << "before"; else + if (s<0) cout << "after"; else + cout << "the same as"; + cout << " the version date "; + cout << setw(4)<0) cout << "before"; else + if (s<0) cout << "after"; else + cout << "the same as"; + cout << " the version date "; + cout << setw(4)<