New upstream version 20171219
Julien Puydt
6 years ago
4 | 4 | |
5 | 5 | osx_image: xcode6.4 |
6 | 6 | dist: trusty |
7 | ||
8 | matrix: | |
9 | include: | |
10 | - env: CONFIGURE_OPTS="--disable-mpfp" | |
11 | os: linux | |
7 | 12 | |
8 | 13 | install: |
9 | 14 | - | |
35 | 40 | - ./autogen.sh |
36 | 41 | |
37 | 42 | - chmod +x configure |
38 | - ./configure --prefix="$PREFIX" --with-ntl="$PREFIX" --with-pari="$PREFIX" --with-flint="$PREFIX" --with-boost="no" --disable-allprogs | |
43 | - ./configure --prefix="$PREFIX" --with-ntl="$PREFIX" --with-pari="$PREFIX" --with-flint="$PREFIX" --with-boost="no" --disable-allprogs $CONFIGURE_OPTS | |
39 | 44 | |
40 | 45 | - make |
41 | 46 | - | |
2 | 2 | # Process this file with autoconf to produce a configure script. |
3 | 3 | |
4 | 4 | AC_PREREQ([2.65]) |
5 | AC_INIT([eclib], [20171002], [john.cremona@gmail.com]) | |
5 | AC_INIT([eclib], [20171219], [john.cremona@gmail.com]) | |
6 | 6 | AM_INIT_AUTOMAKE([-Wall]) |
7 | 7 | AC_MSG_NOTICE([Configuring eclib...]) |
8 | 8 | AC_CONFIG_SRCDIR([libsrc]) |
34 | 34 | # |
35 | 35 | # NB The suffix of the library name (libec.so here) is (c-a).a.r |
36 | 36 | |
37 | LT_CURRENT=3 | |
38 | LT_REVISION=9 | |
37 | LT_CURRENT=4 | |
38 | LT_REVISION=0 | |
39 | 39 | LT_AGE=0 |
40 | 40 | AC_SUBST(LT_CURRENT) |
41 | 41 | AC_SUBST(LT_REVISION) |
229 | 229 | |
230 | 230 | #endif |
231 | 231 | |
232 | // NB Internal precision is always bit-precision. We used to use | |
233 | // decimal precision in the user interface with a conversion factor of | |
234 | // 3.33 (approx log(10)/log(2)). NTL has a default internal bit | |
235 | // precision of 150 which can be changed using RR::SetPrecision(), and | |
236 | // RR:SetOutputPrecision(d) sets the output to d decimal places | |
237 | // (default 10). See www.shoup.net/ntl/doc/tour-ex6.html and | |
238 | // www.shoup.net/ntl/doc/RR.cpp.html. | |
239 | ||
240 | // Set internal precision to n bits and output precision to 0.3*n decimal places | |
232 | 241 | inline void set_precision(long n) |
233 | {RR::SetPrecision(long(n*3.33));RR::SetOutputPrecision(n);} | |
242 | {RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n));} | |
243 | ||
244 | // Mostly for backward compatibility (used in saturate.cc) or for | |
245 | // temporarily changing internal precision when no output is relevant: | |
234 | 246 | inline void set_bit_precision(long n) |
235 | 247 | {RR::SetPrecision(n);} |
248 | ||
249 | // Prompt user for precision | |
236 | 250 | inline void set_precision(const string prompt) |
237 | 251 | {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);} |
252 | ||
253 | // read current precision converted to decimal (approximately) | |
238 | 254 | inline long decimal_precision() {return long(RR::precision()*0.3);} |
255 | ||
256 | // read current bit precision | |
239 | 257 | inline long bit_precision() {return RR::precision();} |
258 | ||
240 | 259 | inline int is_approx_zero(const bigcomplex& z) |
241 | 260 | {return is_approx_zero(z.real())&&is_approx_zero(z.imag());} |
242 | 261 | inline RR to_bigfloat(const int& n) {return to_RR(n);} |
264 | 283 | #define bigfloat double |
265 | 284 | |
266 | 285 | inline long decimal_precision() {return 15;} |
286 | inline long bit_precision() {return 53;} | |
267 | 287 | inline int is_zero(double x) {return fabs(x)<1e-15;} |
268 | 288 | inline int is_approx_zero(double x) {return fabs(x)<1e-10;} |
269 | inline void set_precision(long n) {cout.precision(n);} | |
289 | ||
290 | // We cannot set internal bit precision in this mode, so we just set the output decimal precision | |
291 | inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));} | |
270 | 292 | inline void set_precision(const string prompt) {cout.precision(15);} |
271 | 293 | #define Pi() 3.1415926535897932384626433832795028841 |
272 | 294 | #define Euler() (0.57721566490153286060651209008240243104) |
24 | 24 | |
25 | 25 | #define DEFAULT_QUIET 0 |
26 | 26 | #define DEFAULT_VERBOSE 1 |
27 | #define DEFAULT_PRECISION 15 | |
27 | #define DEFAULT_PRECISION 50 | |
28 | 28 | #define DEFAULT_HLIMQ 10 |
29 | 29 | #define DEFAULT_NAUX 15 |
30 | 30 | #define DEFAULT_HLIMC 0 |
39 | 39 | private: |
40 | 40 | int quiet; // 0/1, controls header output |
41 | 41 | int verbose; // 0-3, controls output verbosity |
42 | long precision; // 1-\infty, controls decimal precision | |
42 | long precision; // 1-\infty, controls floating point precision (in bits) | |
43 | 43 | long hlimq; // 1-20, height limit for quartic search |
44 | 44 | long naux; // number of primes used in syzygy sieve |
45 | 45 | long hlimc; // 1-15, height limit for curve search |
118 | 118 | cerr << "-q\t""quiet""\t\tturns OFF banner display\n"; |
119 | 119 | cerr << "-v n\t""verbosity""\tsets verbosity to n (default="<<DEFAULT_VERBOSE<<")\n"; |
120 | 120 | cerr << "-o\t""PARI/GP output""\tturns ON extra PARI/GP short output (default is OFF)\n"; |
121 | cerr << "-p n\t""precision""\tsets precision to n decimals (default="<<DEFAULT_PRECISION<<")\n"; | |
121 | cerr << "-p n\t""precision""\tsets real precision to n bits (default="<<DEFAULT_PRECISION<<")\n"; | |
122 | 122 | cerr << "-b n\t""quartic bound""\tbound on quartic point search (default="<<DEFAULT_HLIMQ<<")\n"; |
123 | 123 | cerr << "-x n\t""n aux""\t\tnumber of aux primes used for sieving (default="<<DEFAULT_NAUX<<")\n"; |
124 | 124 | cerr << "-l\t""list""\t\tturns ON listing of points (default ON unless v=0)\n"; |
156 | 156 | if(quiet)cerr<<"ON"; else cerr<<"OFF"; cerr<<"\n"; |
157 | 157 | cerr << "PARI/GP output "; |
158 | 158 | if(output_pari)cerr<<"ON"; else cerr<<"OFF"; cerr<<"\n"; |
159 | cerr << "Precision = " << precision << " decimal places (only relevant for multiprecision version)\n"; | |
159 | cerr << "Precision = " << precision << " bits (only relevant for multiprecision version)\n"; | |
160 | 160 | cerr << "Verbosity level = " << verbose << "\n"; |
161 | 161 | cerr << "Limit on height for point search on quartics: "<<hlimq<<"\n"; |
162 | 162 | cerr << "Number of auxiliary primes for syzygy sieving: "<<naux<<"\n"; |
155 | 155 | t=2*abs(b4); if(t>H) H=t; |
156 | 156 | t=2*abs(b6); if(t>H) H=t; |
157 | 157 | t=abs(b8); if(t>H) H=t; |
158 | // NB We use decimal precision here since the formula for nlim (from | |
159 | // Silverman) is given in terms of decimal places required. | |
158 | 160 | long precision = decimal_precision(); |
159 | 161 | #ifdef DEBUG_HEIGHT |
160 | 162 | cout<<"decimal precision = "<<precision<<endl; |
306 | 306 | return is; |
307 | 307 | } |
308 | 308 | |
309 | #endif // NTL_ALL | |
310 | ||
309 | 311 | string getenv_with_default(string env_var, string def_val) |
310 | 312 | { |
311 | 313 | stringstream s; |
316 | 318 | } |
317 | 319 | return s.str(); |
318 | 320 | } |
319 | ||
320 | #endif // NTL_ALL | |
321 |
376 | 376 | rootmod = sqrt(to_bigfloat(N)); |
377 | 377 | factor1 = exp(-(TWOPI)/ (to_bigfloat(chi1.modulus()) * rootmod)); |
378 | 378 | factor2 = exp(-(TWOPI)/ (to_bigfloat(chi2.modulus()) * rootmod)); |
379 | long dp = decimal_precision(); | |
379 | long bp = bit_precision(); | |
380 | 380 | // MUST keep brackets around TWOPI!: |
381 | bigfloat rootlimit1=(dp*LOG10-log(1-factor1))*rootmod/(TWOPI) ; | |
382 | bigfloat rootlimit2=(dp*LOG10-log(1-factor1))*rootmod/(TWOPI) ; | |
381 | bigfloat rootlimit1=(bp-log(1-factor1))*rootmod/(TWOPI) ; | |
382 | bigfloat rootlimit2=(bp-log(1-factor1))*rootmod/(TWOPI) ; | |
383 | 383 | Iasb(limit1,rootlimit1); |
384 | 384 | Iasb(limit2,rootlimit2); |
385 | 385 | #ifdef TRACE_USE |
386 | cout << "Decimal precision = "<<dp<<endl; | |
386 | cout << "Bit precision = "<<bp<<endl; | |
387 | 387 | cout << "Basic limits on n in sums = " << limit << endl; |
388 | 388 | #endif |
389 | 389 | limit1=chi1.modulus()*limit1; |
395 | 395 | #endif |
396 | 396 | /* |
397 | 397 | if(primelist[primelist.size()-1]<limit) |
398 | cout<<"\nLARGEST PRIME "<<primelist[primelist.size()-1]<<" IS BELOW LIMIT "<< limit <<" required for decimal precision "<<dp<<endl; | |
398 | cout<<"\nLARGEST PRIME "<<primelist[primelist.size()-1]<<" IS BELOW LIMIT "<< limit <<" required for bit precision "<<bp<<endl; | |
399 | 399 | */ |
400 | 400 | rootlimit=sqrt(to_bigfloat(limit)); |
401 | 401 | an_cache.resize(I2long(Ifloor(rootlimit+1)),0); |
470 | 470 | b = posmod(b,d); |
471 | 471 | c = posmod(c,d); |
472 | 472 | factor2 = factor1 * drecip; |
473 | long dp = decimal_precision(); | |
474 | Iasb(limit1,(-dp*LOG10-log((1-exp(factor1))/3))/(factor1)) ; | |
475 | Iasb(limit2,(-dp*LOG10-log((1-exp(factor2))/3))/(factor2)) ; | |
473 | long bp = bit_precision(); | |
474 | Iasb(limit1,(-bp-log((1-exp(factor1))/3))/(factor1)) ; | |
475 | Iasb(limit2,(-bp-log((1-exp(factor2))/3))/(factor2)) ; | |
476 | 476 | |
477 | 477 | limit = limit2; |
478 | 478 | rootlimit=sqrt(to_bigfloat(limit)); |
484 | 484 | #endif |
485 | 485 | /* |
486 | 486 | if(primelist[primelist.size()-1]<limit) |
487 | cout<<"\nLARGEST PRIME "<<primelist[primelist.size()-1]<<" IS BELOW LIMIT "<< limit <<" required for decimal precision "<<dp<<endl; | |
487 | cout<<"\nLARGEST PRIME "<<primelist[primelist.size()-1]<<" IS BELOW LIMIT "<< limit <<" required for bit precision "<<bp<<endl; | |
488 | 488 | */ |
489 | 489 | #ifdef TRACE_CACHE |
490 | 490 | cout << "Initial an_cache = "<<an_cache<<endl; |
560 | 560 | |
561 | 561 | void part_period::compute() |
562 | 562 | { |
563 | long dp = decimal_precision(); | |
564 | Iasb(limit,dp*LOG10/y0); | |
563 | long bp = bit_precision(); | |
564 | Iasb(limit,bp/y0); | |
565 | 565 | limit1=limit2=limit; |
566 | 566 | rootlimit=sqrt(to_bigfloat(limit)); |
567 | 567 | an_cache.resize(I2long(Ifloor(rootlimit+1)),0); |
600 | 600 | rootmod=sqrt(to_bigfloat(N)); |
601 | 601 | factor1 = (TWOPI)/rootmod; |
602 | 602 | long maxp = prime_number(nap); |
603 | limit = I2long(Ifloor((15+decimal_precision())*log(10)/factor1)); | |
603 | limit = I2long(Ifloor((30+bit_precision())/factor1)); | |
604 | 604 | if(limit>maxp) limit=maxp; |
605 | 605 | limit1 = limit; |
606 | 606 | rootlimit=sqrt(to_bigfloat(limit)); |
641 | 641 | { |
642 | 642 | initaplist(iN, f->aplist); |
643 | 643 | rootmod = sqrt(to_bigfloat(N)); |
644 | long dp = decimal_precision(); | |
645 | Iasb(limit0,dp*LOG10*rootmod/(TWOPI)) ; // brackets essential | |
644 | long bp = bit_precision(); | |
645 | Iasb(limit0,bp*rootmod/(TWOPI)) ; // brackets essential | |
646 | 646 | } |
647 | 647 | |
648 | 648 | void lfchi::compute(long ell) |
848 | 848 | if((abs((wR-wRC)/wRC)>0.0001)) |
849 | 849 | { |
850 | 850 | cout<<"Real period of constructed curve does not match that" |
851 | <<" of the newform (using decimal precision "<<decimal_precision()<<")"<<endl; | |
851 | <<" of the newform (using bit precision "<<bit_precision()<<")"<<endl; | |
852 | 852 | cout<<"Real period of C: "<<real(wRC)<<endl; |
853 | 853 | cout<<"Real period of f: "<<real(wR)<<endl; |
854 | 854 | cout<<"Ratio = "<<real(wR)/real(wRC)<<endl; |
857 | 857 | if((abs((wRI-wRIC)/wRIC)>0.0001)) |
858 | 858 | { |
859 | 859 | cout<<"Second period of constructed curve does not match that" |
860 | <<" of the newform (using decimal precision "<<decimal_precision()<<")"<<endl; | |
860 | <<" of the newform (using bit precision "<< bit_precision()<<")"<<endl; | |
861 | 861 | cout<<"Imag part of second period of C: "<<real(wRIC)<<endl; |
862 | 862 | cout<<"Imag part of second period of f: "<<real(wRI)<<endl; |
863 | 863 | cout<<"Ratio of imaginary parts = "<<real(wRI)/real(wRIC)<<endl; |
1039 | 1039 | #ifndef MPFP // Multi-Precision Floating Point |
1040 | 1040 | static const bigfloat x0 = to_bigfloat(14); |
1041 | 1041 | #else |
1042 | static const bigfloat x0 = to_bigfloat(log(10)*decimal_precision()); | |
1042 | // log(2) = 0.69314718 | |
1043 | static const bigfloat x0 = to_bigfloat(0.69314718*bit_precision()); | |
1043 | 1044 | #endif |
1044 | 1045 | // cout<<"switch point = "<<x0<<endl; |
1045 | 1046 | // cout<<"x="<<x<<endl; |
1063 | 1064 | } |
1064 | 1065 | |
1065 | 1066 | #if(0) // myg2 and myg3 were inaccurate and now replaced by general |
1066 | // G(r,x) -- whcih also works for r>3! | |
1067 | // G(r,x) -- which also works for r>3! | |
1067 | 1068 | bigfloat myg2(bigfloat x) |
1068 | 1069 | { |
1069 | 1070 | static bigfloat zero=to_bigfloat(0); |
230 | 230 | { |
231 | 231 | cout<<"...but it isn't! (this may be due to insufficient precision:"; |
232 | 232 | #ifdef NTL_ALL |
233 | cout << " decimal precision " <<prec<<" was used)"<<endl; | |
233 | cout << " bit precision " <<prec<<" was used)"<<endl; | |
234 | 234 | #else |
235 | 235 | cout << " standard double precision was used)"<<endl; |
236 | 236 | #endif |
34 | 34 | |
35 | 35 | int main(void) |
36 | 36 | { |
37 | set_precision(15); | |
37 | set_precision(50); | |
38 | 38 | int limit,n=1; |
39 | 39 | #ifdef AUTOLOOP |
40 | 40 | cout<<"Enter first and last N: ";cin>>n>>limit; |
59 | 59 | |
60 | 60 | int main(void) |
61 | 61 | { |
62 | set_precision(10); | |
62 | set_precision(35); | |
63 | 63 | |
64 | 64 | long limit, n=1, hlim1=10, hlim2=15; |
65 | 65 | bigint nn; |
42 | 42 | |
43 | 43 | int main(void) |
44 | 44 | { |
45 | int prec0 = 25; | |
46 | int maxprec = 100; | |
45 | int prec0 = 75; | |
46 | int maxprec = 300; | |
47 | 47 | int prec = prec0; |
48 | int delta_prec = 30; | |
48 | 49 | set_precision(prec); |
49 | 50 | int limit,n=1; |
50 | 51 | string code; |
111 | 112 | CurveRed CR; |
112 | 113 | bigint nc; int nt; |
113 | 114 | bigint a1,a2,a3,a4,a6; |
114 | prec = prec0-10; | |
115 | prec = prec0-delta_prec; | |
115 | 116 | while (C.isnull() && (prec<maxprec)) |
116 | 117 | { |
117 | prec += 10; | |
118 | prec += delta_prec; | |
118 | 119 | set_precision(prec); |
119 | 120 | C = nf.getcurve(i, -1, rperiod); |
120 | 121 | CD = Curvedata(C,1); // The 1 causes minimalization |
53 | 53 | |
54 | 54 | int main(void) |
55 | 55 | { |
56 | int prec0 = 25; | |
57 | int maxprec = 100; | |
56 | int prec0 = 75; | |
57 | int maxprec = 300; | |
58 | 58 | int prec = prec0; |
59 | int delta_prec = 30; | |
59 | 60 | set_precision(prec); |
60 | 61 | // set_precision("Enter number of decimal places"); |
61 | 62 | int verb=0; |
125 | 126 | Curvedata CD; |
126 | 127 | CurveRed CR; |
127 | 128 | bigint nc; |
128 | prec = prec0-10; | |
129 | prec = prec0-delta_prec; | |
129 | 130 | set_precision(prec); |
130 | 131 | C = Curve(); |
131 | 132 | while (C.isnull() && (prec<maxprec)) |
132 | 133 | { |
133 | prec += 10; | |
134 | prec += delta_prec; | |
134 | 135 | set_precision(prec); |
135 | 136 | C = nf.getcurve(i, -1, rperiod, verb); |
136 | 137 | if (!C.isnull()) |
37 | 37 | |
38 | 38 | int main(void) |
39 | 39 | { |
40 | long prec0=25; | |
41 | 40 | int verbose,output,curve_output,limit=210,n=130; |
42 | 41 | cout << "Program h1first. Using METHOD = " << METHOD << endl; |
43 | 42 | cerr << "Verbose output? "; cin>>verbose; |
29 | 29 | |
30 | 30 | int main() |
31 | 31 | { |
32 | set_precision(30); | |
32 | set_precision(100); | |
33 | 33 | initprimes("PRIMES",0); |
34 | 34 | |
35 | 35 | int verbose = 1; |
44 | 44 | cout << "Display newforms (1/0)? "; cin>>showforms; |
45 | 45 | cout << "Attempt curve construction (1/0)? "; cin>>findcurves; |
46 | 46 | #ifdef NTL_ALL |
47 | if(findcurves) set_precision(20); | |
47 | if(findcurves) set_precision(60); | |
48 | 48 | #endif |
49 | 49 | #ifdef AUTOLOOP |
50 | 50 | cout << "How many primes for Hecke eigenvalues? "; |
52 | 52 | |
53 | 53 | cout << "Program nfhpcurve. Using METHOD = " << METHOD |
54 | 54 | << " to find newforms" << endl; |
55 | set_precision(25); | |
55 | set_precision(75); | |
56 | 56 | #ifdef MODULAR |
57 | 57 | cout << "MODULUS for linear algebra = " << MODULUS << endl; |
58 | 58 | #endif |
272 | 272 | cout << "Now working with maxny = " <<maxn<< endl; |
273 | 273 | } |
274 | 274 | #ifdef MPFP |
275 | if(decimal_precision()<50) | |
276 | { | |
277 | set_precision(decimal_precision()+10); | |
278 | cout << "Now working to "<<decimal_precision()<<" decimal places" << endl; | |
275 | if(bit_precision()<150) | |
276 | { | |
277 | set_precision(bit_precision()+30); | |
278 | cout << "Now working with bit precision "<<bit_precision()<< endl; | |
279 | 279 | } |
280 | 280 | #endif |
281 | 281 | } |
43 | 43 | init_time(); |
44 | 44 | start_time(); |
45 | 45 | long n=110, stopp, stopp0; |
46 | long prec0=25; | |
46 | long prec0=75; | |
47 | 47 | int output, verbose; |
48 | 48 | |
49 | 49 | cout << "Program nfhpmcurve. Using METHOD = " << METHOD |
194 | 194 | nf.output_to_file(1,1); |
195 | 195 | } |
196 | 196 | #ifdef MPFP |
197 | if(decimal_precision()<50) | |
198 | { | |
199 | set_precision(decimal_precision()+5); | |
200 | cout << "Now working to "<<decimal_precision()<<" decimal places" << endl; | |
197 | if(bit_precision()<150) | |
198 | { | |
199 | set_precision(bit_precision()+30); | |
200 | cout << "Now working with bit precision "<<bit_precision()<< endl; | |
201 | 201 | } |
202 | 202 | #endif |
203 | 203 | } |
14 | 14 | lminus = 7, mminus = 4 |
15 | 15 | [(-77,2;-3,7),1,1;1] |
16 | 16 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
17 | [w_1,w_2] = [(-1.229967685586970560507325,1.146356169573112593340625),(-1.229967685586970560507325,-1.146356169573112593340625)] | |
18 | tau = (0.07028346131662982498866654,0.9975270598161002366666139) (abs(tau)=0.9999999999999998889776975) | |
19 | w_R = (-2.45993537117394112101465,0) w_IR = (-1.229967685586970560507325,-1.146356169573112593340625) | |
17 | [w_1,w_2] = [(-1.22996768558697,1.14635616957311),(-1.22996768558697,-1.14635616957311)] | |
18 | tau = (0.0702834613166298,0.9975270598161) (abs(tau)=1) | |
19 | w_R = (-2.45993537117394,0) w_IR = (-1.22996768558697,-1.14635616957311) | |
20 | 20 | |
21 | c4 = -278.9999999999998863131623 | |
22 | c6 = -1268.99999999999749888957 | |
21 | c4 = -279 | |
22 | c6 = -1269 | |
23 | 23 | After rounding, using factors 3 for c4 and 3 for c6: |
24 | 24 | ic4 = -279 |
25 | 25 | ic6 = -1269 |
41 | 41 | lminus = 7, mminus = 12 |
42 | 42 | [(-77,2;-3,7),1,1;1] |
43 | 43 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
44 | [w_1,w_2] = [(-0,1.420244348736357409279663),(-1.985547129270674560075349,-0.7101221743681787046398313)] | |
45 | tau = (-0.5,1.398032057678868733674449) (abs(tau)=1.484753728501064129474685) | |
46 | w_R = (-3.971094258541349120150699,0) w_IR = (-1.985547129270674560075349,-0.7101221743681787046398313) | |
44 | [w_1,w_2] = [(-0,1.42024434873636),(-1.98554712927068,-0.710122174368179)] | |
45 | tau = (-0.5,1.39803205767887) (abs(tau)=1.48475372850106) | |
46 | w_R = (-3.97109425854135,0) w_IR = (-1.98554712927068,-0.710122174368179) | |
47 | 47 | |
48 | c4 = 368.9999999999993747223925 | |
49 | c6 = -8072.999999999985448084772 | |
48 | c4 = 368.999999999999 | |
49 | c6 = -8072.99999999998 | |
50 | 50 | After rounding, using factors 3 for c4 and 3 for c6: |
51 | 51 | ic4 = 369 |
52 | 52 | ic6 = -8073 |
68 | 68 | lminus = 7, mminus = 8 |
69 | 69 | [(13,1;1,7),2,2;1] |
70 | 70 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
71 | [w_1,w_2] = [(-0.6687979972943240980498558,0.9676241148913885536941848),(-0.6687979972943240980498558,-0.9676241148913885536941848)] | |
72 | tau = (-0.3534332136464212736903789,0.9354597604876241367932721) (abs(tau)=1) | |
73 | w_R = (-1.337595994588648196099712,0) w_IR = (-0.6687979972943240980498558,-0.9676241148913885536941848) | |
71 | [w_1,w_2] = [(-0.668797997294324,0.967624114891389),(-0.668797997294324,-0.967624114891389)] | |
72 | tau = (-0.353433213646421,0.935459760487624) (abs(tau)=1) | |
73 | w_R = (-1.33759599458865,0) w_IR = (-0.668797997294324,-0.967624114891389) | |
74 | 74 | |
75 | c4 = -638.9999999999956799001666 | |
76 | c6 = 49598.99999999996362021193 | |
75 | c4 = -638.999999999995 | |
76 | c6 = 49598.9999999999 | |
77 | 77 | After rounding, using factors 3 for c4 and 3 for c6: |
78 | 78 | ic4 = -639 |
79 | 79 | ic6 = 49599 |
3 | 3 | Finished reading newform data for N = 11 |
4 | 4 | |
5 | 5 | Form number 1 |
6 | Computing real period via L(f,1): L(f,1) = 0.25384186085590998427; real period = 0.6346046521397750162 | |
7 | Minimal periods found: x0 = 0.6346046521397750162, y0 = 1.4588166169384928494 | |
6 | Computing real period via L(f,1): L(f,1) = 0.253841860855911; real period = 0.634604652139777 | |
7 | Minimal periods found: x0 = 0.634604652139777, y0 = 1.4588166169385 | |
8 | 8 | Matrix (4,1;11,3): dotplus = 1, dotminus = 1 |
9 | 9 | Searching for scaling factors. |
10 | 10 | type = 1, nx = 1, ny = 1 |
11 | w1 = (-0.6346046521397750162,1.4588166169384928494), w2 = (1.2692093042795500324,0) | |
12 | c4 = 496.00000000000613909, c6 = 20008.000000000280124 | |
11 | w1 = (-0.634604652139777,1.4588166169385), w2 = (1.26920930427955,0) | |
12 | c4 = 496, c6 = 20008 | |
13 | 13 | ic4 = 496, ic6 = 20008 |
14 | 14 | Curve is [0,-1,1,-10,-20] N = 11 [(4,1;1,3),1,1;1] |
15 | 15 | Updated newform data: |
22 | 22 | [(4,1;1,3),1,1;1] |
23 | 23 | test reconstruction of curve from updated data: |
24 | 24 | Finding periods -- via L(f_chi) using twists by 1 and 3 |
25 | [w_1,w_2] = [(-1.2692093042795500324,0),(0.6346046521397750162,-1.4588166169384952919)] | |
26 | tau = (-0.5,1.1493901061232554284) (abs(tau)=1.253434328576502832) | |
27 | w_R = (-1.2692093042795500324,0) w_IR = (-0.6346046521397750162,-1.4588166169384952919) | |
25 | [w_1,w_2] = [(-1.26920930427955,0),(0.634604652139777,-1.4588166169385)] | |
26 | tau = (-0.5,1.14939010612325) (abs(tau)=1.2534343285765) | |
27 | w_R = (-1.26920930427955,0) w_IR = (-0.634604652139777,-1.4588166169385) | |
28 | 28 | |
29 | c4 = 496.0000000000073328 | |
30 | c6 = 20008.000000000221917 | |
29 | c4 = 496.000000000001 | |
30 | c6 = 20008 | |
31 | 31 | After rounding: |
32 | 32 | ic4 = 496 |
33 | 33 | ic6 = 20008 |
14 | 14 | lminus = 7, mminus = 4 |
15 | 15 | [(-77,2;-3,7),1,1;1] |
16 | 16 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
17 | [w_1,w_2] = [(1.229967685586970495175018,1.14635616957311248404033),(-1.229967685586970495175018,1.14635616957311248404033)] | |
18 | tau = (-0.07028346131662992344799259,0.9975270598161003196814261) (abs(tau)=0.9999999999999999999999998) | |
19 | w_R = (-2.459935371173940990350036,0) w_IR = (-1.229967685586970495175018,-1.14635616957311248404033) | |
17 | [w_1,w_2] = [(1.229967685586970495175,1.14635616957311248404),(-1.229967685586970495175,1.14635616957311248404)] | |
18 | tau = (-0.07028346131662992344817,0.9975270598161003196814) (abs(tau)=1) | |
19 | w_R = (-2.45993537117394099035,0) w_IR = (-1.229967685586970495175,-1.14635616957311248404) | |
20 | 20 | |
21 | c4 = -278.9999999999999999999985 | |
22 | c6 = -1268.999999999999999999938 | |
21 | c4 = -279.0000000000000000001 | |
22 | c6 = -1269.000000000000000004 | |
23 | 23 | After rounding, using factors 3 for c4 and 3 for c6: |
24 | 24 | ic4 = -279 |
25 | 25 | ic6 = -1269 |
38 | 38 | lminus = 7, mminus = 12 |
39 | 39 | [(-77,2;-3,7),1,1;1] |
40 | 40 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
41 | [w_1,w_2] = [(0,-1.42024434873635680197068),(1.985547129270674318649064,0.7101221743681784009853398)] | |
42 | tau = (-0.5,1.398032057678869145976115) (abs(tau)=1.484753728501064551755562) | |
43 | w_R = (-3.971094258541348637298128,0) w_IR = (-1.985547129270674318649064,-0.7101221743681784009853398) | |
41 | [w_1,w_2] = [(0,-1.420244348736356801971),(1.985547129270674318649,0.7101221743681784009854)] | |
42 | tau = (-0.5,1.398032057678869145976) (abs(tau)=1.484753728501064551755) | |
43 | w_R = (-3.971094258541348637298,0) w_IR = (-1.985547129270674318649,-0.7101221743681784009854) | |
44 | 44 | |
45 | c4 = 368.9999999999999999999945 | |
46 | c6 = -8072.999999999999999999854 | |
45 | c4 = 368.9999999999999999999 | |
46 | c6 = -8072.999999999999999998 | |
47 | 47 | After rounding, using factors 3 for c4 and 3 for c6: |
48 | 48 | ic4 = 369 |
49 | 49 | ic6 = -8073 |
62 | 62 | lminus = 7, mminus = 8 |
63 | 63 | [(13,1;1,7),2,2;1] |
64 | 64 | Finding periods -- via L(f_chi) using twists by 1 and 7 |
65 | [w_1,w_2] = [(0.6687979972943242528826713,0.9676241148913877311526313),(-0.6687979972943242528826713,0.9676241148913877311526313)] | |
66 | tau = (0.3534332136464203486286135,0.9354597604876244964377629) (abs(tau)=1) | |
67 | w_R = (-1.337595994588648505765343,0) w_IR = (-0.6687979972943242528826713,-0.9676241148913877311526313) | |
65 | [w_1,w_2] = [(0.6687979972943242528827,0.9676241148913877311527),(-0.6687979972943242528827,0.9676241148913877311527)] | |
66 | tau = (0.3534332136464203486287,0.9354597604876244964378) (abs(tau)=1) | |
67 | w_R = (-1.337595994588648505765,0) w_IR = (-0.6687979972943242528827,-0.9676241148913877311527) | |
68 | 68 | |
69 | c4 = -638.9999999999999999999905 | |
70 | c6 = 49598.99999999999999999972 | |
69 | c4 = -638.9999999999999999995 | |
70 | c6 = 49598.99999999999999997 | |
71 | 71 | After rounding, using factors 3 for c4 and 3 for c6: |
72 | 72 | ic4 = -639 |
73 | 73 | ic6 = 49599 |
3 | 3 | Finished reading newform data for N = 11 |
4 | 4 | |
5 | 5 | Form number 1 |
6 | Computing real period via L(f,1): L(f,1) = 0.25384186085591068435; real period = 0.63460465213977671087 | |
7 | Minimal periods found: x0 = 0.63460465213977671087, y0 = 1.4588166169384952293 | |
6 | Computing real period via L(f,1): L(f,1) = 0.253841860855910684337759; real period = 0.634604652139776710844397 | |
7 | Minimal periods found: x0 = 0.634604652139776710844397, y0 = 1.45881661693849522933089 | |
8 | 8 | Matrix (4,1;11,3): dotplus = 1, dotminus = 1 |
9 | 9 | Searching for scaling factors. |
10 | 10 | type = 1, nx = 1, ny = 1 |
11 | w1 = (0.63460465213977671087,1.4588166169384952293), w2 = (1.2692093042795534217,0) | |
12 | c4 = 495.99999999999999988, c6 = 20007.999999999999996 | |
11 | w1 = (0.634604652139776710844397,1.45881661693849522933089), w2 = (1.26920930427955342168879,0) | |
12 | c4 = 496, c6 = 20008.0000000000000000001 | |
13 | 13 | ic4 = 496, ic6 = 20008 |
14 | 14 | Curve is [0,-1,1,-10,-20] N = 11 [(4,1;1,3),1,1;1] |
15 | 15 | Updated newform data: |
22 | 22 | [(4,1;1,3),1,1;1] |
23 | 23 | test reconstruction of curve from updated data: |
24 | 24 | Finding periods -- via L(f_chi) using twists by 1 and 3 |
25 | [w_1,w_2] = [(-1.2692093042795534217,0),(-0.63460465213977671087,-1.4588166169384952293)] | |
26 | tau = (0.5,1.1493901061232523806) (abs(tau)=1.253434328576500002) | |
27 | w_R = (-1.2692093042795534217,0) w_IR = (-0.63460465213977671087,-1.4588166169384952293) | |
25 | [w_1,w_2] = [(-1.26920930427955342168879,0),(-0.634604652139776710844397,-1.45881661693849522933089)] | |
26 | tau = (0.5,1.14939010612325238068763) (abs(tau)=1.25343432857650000211637) | |
27 | w_R = (-1.26920930427955342168879,0) w_IR = (-0.634604652139776710844397,-1.45881661693849522933089) | |
28 | 28 | |
29 | c4 = 495.99999999999999985 | |
30 | c6 = 20007.999999999999998 | |
29 | c4 = 496.000000000000000000003 | |
30 | c6 = 20007.9999999999999999999 | |
31 | 31 | After rounding: |
32 | 32 | ic4 = 496 |
33 | 33 | ic6 = 20008 |
0 | 0 | Input curve [0,0,1,-7,6] |
1 | 1 | Rank of points found is 3 |
2 | Generator 1 is [1:-1:1]; height 0.66820516565192793502 | |
3 | Generator 2 is [-2:3:1]; height 1.368572505353930112 | |
4 | Generator 3 is [-14:25:8]; height 2.7173593928122930896 | |
5 | Regulator = 0.41714355875838397005 | |
2 | Generator 1 is [1:-1:1]; height 0.668205165651927935033 | |
3 | Generator 2 is [-2:3:1]; height 1.36857250535393011205 | |
4 | Generator 3 is [-14:25:8]; height 2.71735939281229308966 | |
5 | Regulator = 0.417143558758383969814 | |
6 | 6 | Points have been successfully saturated |
7 | 7 | |
8 | 8 | [[1,-1],[-2,3],[-7/4,25/8]] |
9 | 9 | |
10 | 10 | Input curve [0,1,1,-2,0] |
11 | 11 | Rank of points found is 2 |
12 | Generator 1 is [0:-1:1]; height 0.32700077365160495184 | |
13 | Generator 2 is [-1:1:1]; height 0.68666708330558658573 | |
14 | Regulator = 0.15246017794314375163 | |
12 | Generator 1 is [0:-1:1]; height 0.327000773651604951843 | |
13 | Generator 2 is [-1:1:1]; height 0.686667083305586585723 | |
14 | Regulator = 0.152460177943143751624 | |
15 | 15 | Points have been successfully saturated |
16 | 16 | |
17 | 17 | [[0,-1],[-1,1]] |
20 | 20 | Searching on standard minimal model [0,1,1,-2,0] |
21 | 21 | (points found will be transferred back at end) |
22 | 22 | Transformation: [u,r,s,t] = [1,-5,-6,23] with scale factor 30 |
23 | [-6:1:900] maps to [-1:1:1] on [0,1,1,-2,0], with height 0.68666708330558658573 | |
24 | Rank of known points is 1 with regulator 0.68666708330558658573 | |
23 | [-6:1:900] maps to [-1:1:1] on [0,1,1,-2,0], with height 0.686667083305586585723 | |
24 | Rank of known points is 1 with regulator 0.686667083305586585723 | |
25 | 25 | |
26 | 26 | Rank of points found is 2 |
27 | Generator 1 is [0:-1:1]; height 0.32700077365160495184 | |
27 | Generator 1 is [0:-1:1]; height 0.327000773651604951843 | |
28 | 28 | --maps back to [-75:11:13500] on input curve |
29 | Generator 2 is [-2:0:1]; height 0.92075778268510239274 | |
29 | Generator 2 is [-2:0:1]; height 0.92075778268510239272 | |
30 | 30 | --maps back to [-42:7:5400] on input curve |
31 | Regulator = 0.15246017794314375163 | |
31 | Regulator = 0.152460177943143751624 | |
32 | 32 | Points have been successfully saturated |
33 | 33 | |
34 | 34 | [[-1/180,11/13500],[-7/900,7/5400]] |
48 | 48 | int main(void) |
49 | 49 | { |
50 | 50 | initprimes("PRIMES",0); |
51 | set_precision("Enter decimal precision"); | |
51 | set_precision(80); | |
52 | 52 | long limit,n=1; |
53 | 53 | int dump=1, detail; |
54 | 54 | long maxn, dmax=DMAX; |
42 | 42 | int main() |
43 | 43 | { |
44 | 44 | #ifdef NTL_ALL |
45 | set_precision(20); | |
45 | set_precision(70); | |
46 | 46 | #endif |
47 | 47 | initprimes("PRIMES",0); |
48 | 48 |
33 | 33 | |
34 | 34 | int main() |
35 | 35 | { |
36 | set_precision(200); | |
36 | set_precision(600); | |
37 | 37 | cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) |
38 | 38 | |
39 | 39 | int verb=1; //0; |
29 | 29 | |
30 | 30 | int main(){ |
31 | 31 | #ifdef NTL_ALL |
32 | set_precision("Enter number of decimal places"); | |
32 | set_precision("Enter precision in bits"); | |
33 | 33 | #endif |
34 | 34 | int verbose=0; |
35 | 35 | cout << "Verbose? (0/1) " << flush; cin >> verbose; |
44 | 44 | int main() |
45 | 45 | { |
46 | 46 | // cout<<"precision = "<<decimal_precision()<<endl; |
47 | set_precision(15); | |
47 | set_precision(50); | |
48 | 48 | // cout<<"precision = "<<decimal_precision()<<endl; |
49 | 49 | cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) |
50 | 50 |
25 | 25 | |
26 | 26 | int main(void) |
27 | 27 | { |
28 | set_precision("Enter number of decimal places"); | |
28 | set_precision("Enter precision in bits"); | |
29 | 29 | bigfloat x=to_bigfloat(3.125), y=to_bigfloat(4.25); |
30 | 30 | |
31 | 31 | bigcomplex z = bigcomplex(x,y); |
41 | 41 | int main() |
42 | 42 | { |
43 | 43 | #ifdef NTL_ALL |
44 | set_precision("Enter number of decimal places"); | |
44 | set_precision("Enter precision in bits"); | |
45 | 45 | #endif |
46 | 46 | cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) |
47 | 47 |
5 | 5 | The points are P0 = [0,2], P1 = [1,0], and P2 = [2,0] |
6 | 6 | Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] |
7 | 7 | Computing their heights: |
8 | Heights are 0.990906333153087848231166390178, 0.668205165651927890380079588795, and 0.767043355331546106157247777446 | |
8 | Heights are 0.990906333153088, 0.668205165651928, and 0.767043355331546 | |
9 | 9 | The origin is [0:1:0] |
10 | 10 | Now some additions etc,: |
11 | 11 | P0 + P1 = [3:3:1] |
362 | 362 | 3, 3, 2: [4189408:-9665550:704969] |
363 | 363 | 3, 3, 3: [173402493:270630132:41781923] |
364 | 364 | P0 -P1 -P2 = [93:-143:27] |
365 | Height of P0-P1-P2 = 3.5188832555391416079260125116 | |
365 | Height of P0-P1-P2 = 3.51888325553914 | |
366 | 366 | 3 (P0 -P1 -P2) = [141154686087724689336:364929251737439849995:18067866971533021791] |
367 | Height of 3*(P0-P1-P2) = 31.6699492998522735831556929043 | |
367 | Height of 3*(P0-P1-P2) = 31.6699492998523 | |
368 | 368 | The quotient is 9 |
1 | 1 | has real part = 3.125 |
2 | 2 | and imaginary part = 4.25i |
3 | 3 | z has complex conjugate = (3.125,-4.25) |
4 | AGM((3.125,4.25),(1,0)) = (2.07831617217326684,1.56336158990659582) | |
4 | AGM((3.125,4.25),(1,0)) = (2.07831617217326684003,1.56336158990659582007) | |
5 | 5 | |
6 | AGM((1,1),(2,1)) = (1.4713493628646535661,1.0200541263376600197) | |
6 | AGM((1,1),(2,1)) = (1.47134936286465356604,1.02005412633766001965) | |
7 | 7 | |
8 | 8 | Enter Integer coefficients of a (monic) cubic:The 1 root(s) are: |
9 | 9 | [ -1 ] |
10 | Enter a real or complex: Main cube root = (1.6289371459221758752,0.52017450230454583957) | |
11 | whose cube is (2.9999999999999999999,4) | |
12 | Next cube root = (-1.2649529063577516597,1.1506136983844504996) | |
13 | whose cube is (2.9999999999999999999,4) | |
14 | Next cube root = (-0.36398423956442421547,-1.6707882006889963391) | |
15 | whose cube is (2.9999999999999999996,3.9999999999999999998) | |
10 | Enter a real or complex: Main cube root = (1.62893714592217587521,0.520174502304545839545) | |
11 | whose cube is (2.99999999999999999999,3.99999999999999999999) | |
12 | Next cube root = (-1.2649529063577516597,1.15061369838445049961) | |
13 | whose cube is (2.99999999999999999999,4.00000000000000000001) | |
14 | Next cube root = (-0.363984239564424215513,-1.67078820068899633915) | |
15 | whose cube is (3.00000000000000000001,3.99999999999999999999) | |
16 | 16 | Enter real coefficients a b c d e of a quartic:Quartic [1,2,3,4,5] has roots: |
17 | (-1.2878154795576479889,-0.85789675832849028643) | |
18 | (-1.2878154795576479889,0.85789675832849028643) | |
19 | (0.28781547955764798888,1.4160930801719079387) | |
20 | (0.28781547955764798888,-1.4160930801719079387) | |
17 | (-1.28781547955764798887,-0.857896758328490286416) | |
18 | (-1.28781547955764798887,0.857896758328490286416) | |
19 | (0.287815479557647988873,1.41609308017190793872) | |
20 | (0.287815479557647988873,-1.41609308017190793872) | |
21 | 21 |
10 | 10 | |
11 | 11 | Quartic has rational point (x:y:z) = (883:37002:145) |
12 | 12 | Point on (c,d) curve = [-113054905:-32672766:3048625] |
13 | height = 13.565420700285587132 | |
13 | height = 13.5654207002855871318 | |
14 | 14 | Point on (c',d') curve = [175298864692140:22290732796922058:2098872790442875] |
15 | height = 27.130841400571174264 | |
15 | height = 27.1308414005711742635 | |
16 | 16 | |
17 | 17 | Enter quartic coefficients (a,0,c,0,e) or just a c e |
0 | 0 | Testing some points: |
1 | 1 | The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] |
2 | 2 | Curve [0,0,1,-7,6] |
3 | Periods: [w_1,w_2] = [(0,-1.4805482682414149933073311106409602506642033146287),(2.0758439915434665249420878417536431498858141282849,0)] | |
4 | tau = (0,1.4020778897057774955179040745500506975747935056134) (abs(tau)=1.4020778897057774955179040745500506975747935056134) | |
5 | w_R = (2.0758439915434665249420878417536431498858141282849,0) w_I = (0,1.4805482682414149933073311106409602506642033146287) | |
3 | Periods: [w_1,w_2] = [(0,-1.480548268241414993307331110640960250664203314628647),(2.075843991543466524942087841753643149885814128284888,0)] | |
4 | tau = (0,1.402077889705777495517904074550050697574793505613414) (abs(tau)=1.402077889705777495517904074550050697574793505613414) | |
5 | w_R = (2.075843991543466524942087841753643149885814128284888,0) w_I = (0,1.480548268241414993307331110640960250664203314628647) | |
6 | 6 | |
7 | 7 | |
8 | Elliptic log of P is (0.54656290832212043141980107294107651770280526691204,0.74027413412070749665366555532048012533210165731435) | |
8 | Elliptic log of P is (0.546562908322120431419801072941076517702805266912011,0.7402741341207074966536655553204801253321016573143237) | |
9 | 9 | Reconstructed P = [0:2:1] |
10 | 10 | OK! |
11 | 11 | |
12 | Elliptic log of P is (0.90382935626867113367176487892234560308427831107608,0.74027413412070749665366555532048012533210165731435) | |
12 | Elliptic log of P is (0.9038293562686711336717648789223456030842783110760873,0.7402741341207074966536655553204801253321016573143237) | |
13 | 13 | Reconstructed P = [1:0:1] |
14 | 14 | OK! |
15 | 15 | |
16 | Elliptic log of P is (1.14719994671046572970364208782769493741074222861,0) | |
16 | Elliptic log of P is (1.147199946710465729703642087827694937410742228609969,0) | |
17 | 17 | Reconstructed P = [2:0:1] |
18 | 18 | OK! |
19 | 19 | |
20 | Elliptic log of P is (1.0931258166442408628396021458821530354056105338245,0) | |
20 | Elliptic log of P is (1.093125816644240862839602145882153035405610533824022,0) | |
21 | 21 | Reconstructed P = [245:-32:125] |
22 | 22 | OK! |
23 | 23 | |
24 | Elliptic log of P is (1.8076587125373422673435297578446912061685566221522,0) | |
24 | Elliptic log of P is (1.807658712537342267343529757844691206168556622152175,0) | |
25 | 25 | Reconstructed P = [14:51:1] |
26 | 26 | OK! |
27 | 27 | |
28 | Elliptic log of P is (0.21855590187746493446519633390174672493567032893506,0) | |
28 | Elliptic log of P is (0.2185559018774649344651963339017467249356703289350498,0) | |
29 | 29 | Reconstructed P = [21:-96:1] |
30 | 30 | OK! |
31 | 31 | |
32 | Elliptic log of P is (1.4503922645907915650915659518634221207870835779881,0) | |
32 | Elliptic log of P is (1.450392264590791565091565951863422120787083577988098,0) | |
33 | 33 | Reconstructed P = [3:3:1] |
34 | 34 | OK! |
35 | 35 | |
36 | Elliptic log of P is (1.832473401101671928910210632848293815559350210751,0.74027413412070749665366555532048012533210165731435) | |
36 | Elliptic log of P is (1.832473401101671928910210632848293815559350210751007,0.7402741341207074966536655553204801253321016573143237) | |
37 | 37 | Reconstructed P = [-2:-4:1] |
38 | 38 | OK! |
39 | 39 | |
40 | Elliptic log of P is (0.60063703838834529828384101488661841970793696169797,0.74027413412070749665366555532048012533210165731435) | |
40 | Elliptic log of P is (0.600637038388345298283841014886618419707936961697958,0.7402741341207074966536655553204801253321016573143237) | |
41 | 41 | Reconstructed P = [2:13:8] |
42 | 42 | OK! |
43 | 43 | |
55 | 55 | |
56 | 56 | ================================ |
57 | 57 | Curve [1,1,0,-202,1025] |
58 | Periods: [w_1,w_2] = [(0,0.6327790298514333023716801301216127523020758542864),(-2.0131613909534741204308876218764326959565176646351,-0.3163895149257166511858400650608063761510379271432)] | |
59 | tau = (-0.5,3.1814603455271474113187811974948516017119213527374) (abs(tau)=3.2205108182028695361142148803829701925869457353831) | |
60 | w_R = (4.0263227819069482408617752437528653919130353292703,0) w_IR = (2.0131613909534741204308876218764326959565176646351,0.3163895149257166511858400650608063761510379271432) | |
58 | Periods: [w_1,w_2] = [(0,0.6327790298514333023716801301216127523020758542863803),(-2.013161390953474120430887621876432695956517664624582,-0.3163895149257166511858400650608063761510379271431901)] | |
59 | tau = (-0.5,3.181460345527147411318781197494851601711921352720843) (abs(tau)=3.220510818202869536114214880382970192586945735366723) | |
60 | w_R = (4.026322781906948240861775243752865391913035329249165,0) w_IR = (2.013161390953474120430887621876432695956517664624582,0.3163895149257166511858400650608063761510379271431901) | |
61 | 61 | |
62 | 62 | |
63 | 63 | The point Q is = [-8:51:1] |
64 | Elliptic log of P is (2.1525156669616024162853317818644956119079357950702,0) | |
64 | Elliptic log of P is (2.152515666961602416285331781864495611907935795059699,0) | |
65 | 65 | Reconstructed P = [-8:51:1] |
66 | 66 | The point P3 is = [8:-3:1] |
67 | Elliptic log of P is (3.4017204102584996326696274231234087985780021513184,0) | |
67 | Elliptic log of P is (3.401720410258499632669627423123408798578002151186486,0) | |
68 | 68 | Reconstructed P = [8:-3:1] |
69 | 69 | (m*[8:-3:1])/m = [ [8:-3:1] ] |
70 | 70 | Checking... |
10 | 10 | Local heights: |
11 | 11 | Sum so far = 0 |
12 | 12 | log(den(x(P))) = 0 |
13 | 2: -0.5198603854199589820629240910936324260566251007701914405905100071200452164772710367043974952473140157 | |
13 | 2: -0.519860385419958982062924091093632426056625100770191440590510007120045216477271036704397495247314015656501 | |
14 | 14 | 3: 0 |
15 | 5: -1.07295860828940024973383955548412509301706756951234514794176526098278599180510517642008925206211974 | |
15 | 5: -1.07295860828940024973383955548412509301706756951234514794176526098278599180510517642008925206211974053331 | |
16 | 16 | 7: 0 |
17 | 17 | 43: 0 |
18 | Sum so far = -1.592818993709359231796763646577757519073692670282536588532275268102831208282376213124486747309433756 | |
19 | R: 2.659177737235169710637917177734199697292076189313708599084960419327322781956766458009480750648562175 | |
18 | Sum so far = -1.59281899370935923179676364657775751907369267028253658853227526810283120828237621312448674730943375618981 | |
19 | R: 2.65917773723516971063791717773419969729207618931370859908496041932732278195676645800944278257081785914433 | |
20 | 20 | |
21 | Sum of local heights: 1.066358743525810478841153531156442178218383519031172010552685151224491573674390244884994003339128419 | |
22 | global height of [1794:-732:1] is 1.066358743525810478841153531156442178218383519031172010552685151224491573674390244884994003339128419 | |
21 | Sum of local heights: 1.06635874352581047884115353115644217821838351903117201055268515122449157367439024488495603526138410295452 | |
22 | global height of [1794:-732:1] is 1.06635874352581047884115353115644217821838351903117201055268515122449157367439024488495603526138410295452 | |
23 | 23 | Input a point on curve, [0] to finish: |
24 | 24 | Input a curve: |
25 | 25 | |
27 | 27 | The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] |
28 | 28 | Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] |
29 | 29 | Computing their heights: |
30 | Heights are 0.9909063331530879738825985528871942281843259824931108393150833774164020082875685776039341823636713394, 0.6682051656519279350331420508878230470812918323595349529056109385150431526967321858665008647330999237, and 0.7670433553315462057954506465522171545624246191884909038215957193741174220566628974553182327789193967 | |
30 | Heights are 0.990906333153087973882598552887194228184325982493110839315083377416402008287568577603934182363671339267515, 0.668205165651927935033142050887823047081291832359534952905610938515043152696732185866500864733099924082437, and 0.767043355331546205795450646552217154562424619188490903821595719374117422056662897455318232778919396494193 | |
31 | 31 | The origin is [0:1:0] |
32 | 32 | Now some additions etc,: |
33 | 33 | P0 + P1 = [3:3:1] |
40 | 40 | P0 +3 P1 - P2 = [816:-23310:1] |
41 | 41 | 2P0 +2 P1 + P2 = [93:896:1] |
42 | 42 | P0 -P1 -P2 = [93:-143:27] |
43 | with height 3.518883255539141483787954523042654948159390980311398873751347396089691868453592684761314771284371825 | |
43 | with height 3.51888325553914148378795452304265494815939098031139887375134739608969186845359268476131477128437182444014 | |
44 | 44 | 2 (P0 -P1 -P2) = [936156018:-10370368:469097433] |
45 | with height 14.0755330221565659351518180921706197926375639212455954950053895843587674738143707390452590851374873 | |
45 | with height 14.0755330221565659351518180921706197926375639212455954950053895843587674738143707390452590851374872977606 | |
46 | 46 | The quotient is 4 |
47 | 47 | 3 (P0 -P1 -P2) = [141154686087724689336:364929251737439849995:18067866971533021791] |
48 | with height 31.66994929985227335409159070738389453343451882280258986376212656480722681608233416285183294155934642 | |
49 | The quotient is 9 | |
50 | The regulator of P0, P1, P2 is 0.4171435587583839698171195446180933967498101060984983867247368197561777025341638136666749988193139797 | |
48 | with height 31.6699492998522733540915907073838945334345188228025898637621265648072268160823341628518329415593464199613 | |
49 | The quotient is 9.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 | |
50 | The regulator of P0, P1, P2 is 0.41714355875838396981711954461809339674981010609849838672473681975617770253416381366667499881931397967318 |
0 | 0 | Input curve = [0,0,1,-7,6]: |
1 | 1 | Minimal model = [0,0,1,-7,6] |
2 | Periods: [w_1,w_2] = [(0,-1.4805482682414149933073311106409602506642033146287),(2.0758439915434665249420878417536431498858141282849,0)] | |
3 | tau = (0,1.4020778897057774955179040745500506975747935056134) (abs(tau)=1.4020778897057774955179040745500506975747935056134) | |
4 | w_R = (2.0758439915434665249420878417536431498858141282849,0) w_I = (0,1.4805482682414149933073311106409602506642033146287) | |
2 | Periods: [w_1,w_2] = [(0,-1.480548268241414993307331110640960250664203314628647),(2.075843991543466524942087841753643149885814128284888,0)] | |
3 | tau = (0,1.402077889705777495517904074550050697574793505613414) (abs(tau)=1.402077889705777495517904074550050697574793505613414) | |
4 | w_R = (2.075843991543466524942087841753643149885814128284888,0) w_I = (0,1.480548268241414993307331110640960250664203314628647) | |
5 | 5 | |
6 | 6 | Curve from periods: [0,0,1,-7,6] |
7 | 7 | Input curve = [0,0,0,0,1024]: |
8 | 8 | Minimal model = [0,0,1,0,0] |
9 | Periods: [w_1,w_2] = [(-2.6499581254281749359705342494726580538578028073038,-1.529954037057192874913194172308824358572828947161),(2.6499581254281749359705342494726580538578028073038,-1.529954037057192874913194172308824358572828947161)] | |
10 | tau = (-0.49999999999999999999999999999999999999999999999997,0.86602540378443864676372317075293618347140262690521) (abs(tau)=0.99999999999999999999999999999999999999999999999999) | |
11 | w_R = (5.2999162508563498719410684989453161077156056146076,0) w_IR = (2.6499581254281749359705342494726580538578028073038,1.529954037057192874913194172308824358572828947161) | |
9 | Periods: [w_1,w_2] = [(-2.649958125428174935970534249472658053857802807303836,-1.52995403705719287491319417230882435857282894716093),(0.1670477943807622278837835291969676174259498050065655e-51,-3.059908074114385749826388344617648717145657894321859)] | |
10 | tau = (0.5,0.8660254037844386467637231707529361834714026269051904) (abs(tau)=1) | |
11 | w_R = (5.299916250856349871941068498945316107715605614607673,0) w_IR = (2.649958125428174935970534249472658053857802807303836,1.52995403705719287491319417230882435857282894716093) | |
12 | 12 | |
13 | 13 | Curve from periods: [0,0,1,0,0] |
14 | 14 | Input curve = [0,0,0,-16/9,0]: |
15 | 15 | Minimal model = [0,0,0,-9,0] |
16 | Periods: [w_1,w_2] = [(1.5138456348012471454717362566781957801974612083004,0),(0,1.5138456348012471454717362566781957801974612083004)] | |
16 | Periods: [w_1,w_2] = [(1.513845634801247145471736256678195780197461208300374,0),(0,1.513845634801247145471736256678195780197461208300374)] | |
17 | 17 | tau = (0,1) (abs(tau)=1) |
18 | w_R = (1.5138456348012471454717362566781957801974612083004,0) w_I = (0,1.5138456348012471454717362566781957801974612083004) | |
18 | w_R = (1.513845634801247145471736256678195780197461208300374,0) w_I = (0,1.513845634801247145471736256678195780197461208300374) | |
19 | 19 | |
20 | 20 | Curve from periods: [0,0,0,-9,0] |
21 | 21 | Input curve = [0,0,0,16/9,0]: |
22 | 22 | Minimal model = [0,0,0,9,0] |
23 | Periods: [w_1,w_2] = [(-1.0704505140376155993171555258476451509529488959056,-1.0704505140376155993171555258476451509529488959056),(1.0704505140376155993171555258476451509529488959056,-1.0704505140376155993171555258476451509529488959056)] | |
23 | Periods: [w_1,w_2] = [(-1.070450514037615599317155525847645150952948895905593,-1.070450514037615599317155525847645150952948895905593),(1.070450514037615599317155525847645150952948895905593,-1.070450514037615599317155525847645150952948895905593)] | |
24 | 24 | tau = (0,1) (abs(tau)=1) |
25 | w_R = (2.1409010280752311986343110516952903019058977918112,0) w_IR = (1.0704505140376155993171555258476451509529488959056,1.0704505140376155993171555258476451509529488959056) | |
25 | w_R = (2.140901028075231198634311051695290301905897791811186,0) w_IR = (1.070450514037615599317155525847645150952948895905593,1.070450514037615599317155525847645150952948895905593) | |
26 | 26 | |
27 | 27 | Curve from periods: [0,0,0,9,0] |
5 | 5 | The points are P0 = [0,2], P1 = [1,0], and P2 = [2,0] |
6 | 6 | Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] |
7 | 7 | Computing their heights: |
8 | Heights are 0.990906333153087973882598552884, 0.66820516565192793503314205089, and 0.76704335533154620579545064655 | |
8 | Heights are 0.990906333153087973882598552889, 0.668205165651927935033142050886, and 0.76704335533154620579545064655 | |
9 | 9 | The origin is [0:1:0] |
10 | 10 | Now some additions etc,: |
11 | 11 | P0 + P1 = [3:3:1] |
4 | 4 | Input non-torsion points: [ [-1870:9257:8] [-197:1984:1] ] |
5 | 5 | Input torsion points: [ ] |
6 | 6 | Saturation complete --input points were saturated |
7 | Generator 1 is [-1870:9257:8]; height 2.008387115126900729103485439709136753676710547977412853989835325093209212911797653507811667285834924 | |
8 | Generator 2 is [-197:1984:1]; height 0.1824047873853615261914345567373697515225258314488927760080825886155412255056081106767442707065534151 | |
7 | Generator 1 is [-1870:9257:8]; height 2.0083871151269007291034854397091367536767105479774128539898353250932092129117976535078116672858349234404 | |
8 | Generator 2 is [-197:1984:1]; height 0.182404787385361526191434556737369751522525831448892776008082588615541225505608110676744270706553414174811 | |
9 | 9 | |
10 | Regulator = 0.2889190749974031511717279373817398511855450827910204495028842971619894194895945979459417394247120525 | |
10 | Regulator = 0.288919074997403151171727937381739851185545082791020449502884297161989419489594597945941739424712049747559 | |
11 | 11 | |
12 | 12 | 24129 18 1 [0,0,1,-68799,-1969790] 2 [-1870:9257:8] [-197:1984:1] |
13 | 13 | ============================================================== |
18 | 18 | Input non-torsion points: [ [-178:299:8] [-23748:-59351:1728] ] |
19 | 19 | Input torsion points: [ [34:-17:1] [-10:5:1] ] |
20 | 20 | Saturation complete --input points were saturated |
21 | Generator 1 is [-178:299:8]; height 4.692925879781232754357709689772257265110950392030567132031104408050003742075279592044944091525617177 | |
22 | Generator 2 is [-23748:-59351:1728]; height 6.994855314243790199794084925529654274011790403394180222178312526437009546427866888621853186553416563 | |
21 | Generator 1 is [-178:299:8]; height 4.69292587978123275435770968977225726511095039203056713203110440805000374207527959204494409152561717628785 | |
22 | Generator 2 is [-23748:-59351:1728]; height 6.99485531424379019979408492552965427401179040339418022217831252643700954642786688862185318655341656280826 | |
23 | 23 | |
24 | Regulator = 32.79330968457201443891254803103500298133180731829589812378504456291583055922703713650068931945477071 | |
24 | Regulator = 32.793309684572014438912548031035002981331807318295898123785044562915830559227037136500689319454770705583 | |
25 | 25 | |
26 | 26 | 133507 b 2 [1,-1,0,-898,-7905] 2 [-178:299:8] [-23748:-59351:1728] |
27 | 27 | ============================================================== |
28 | 28 | |
29 | 29 | int main() |
30 | 30 | { |
31 | // set_precision("Enter number of decimal places"); | |
31 | // set_precision("Enter precision in bits"); | |
32 | 32 | initprimes("PRIMES",0); |
33 | 33 | |
34 | 34 | Curve E(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); |
33 | 33 | |
34 | 34 | int main() |
35 | 35 | { |
36 | // set_precision("Enter number of decimal places"); | |
36 | // set_precision("Enter precision in bits"); | |
37 | 37 | initprimes("PRIMES",0); |
38 | 38 | int j, npts; |
39 | 39 |
67 | 67 | |
68 | 68 | int main(){ |
69 | 69 | #ifdef NTL_ALL |
70 | // set_precision("Enter number of decimal places"); | |
71 | set_precision(50); | |
70 | // set_precision("Enter precision in bits"); | |
71 | set_precision(175); | |
72 | 72 | #endif |
73 | 73 | initprimes("PRIMES",0); |
74 | 74 |
50 | 50 | int main() |
51 | 51 | { |
52 | 52 | initprimes("PRIMES",0); |
53 | cout.precision(15); | |
53 | cout.precision(50); | |
54 | 54 | cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) |
55 | 55 | |
56 | 56 | int verb; cout << "Verbose? "; cin >> verb; |
25 | 25 | |
26 | 26 | int main(){ |
27 | 27 | #ifdef NTL_ALL |
28 | set_precision(100); | |
28 | set_precision(350); | |
29 | 29 | #endif |
30 | 30 | initprimes("PRIMES",1); |
31 | 31 | Curve E; |
51 | 51 | int main() |
52 | 52 | { |
53 | 53 | #ifdef NTL_ALL |
54 | set_precision(30); | |
54 | set_precision(100); | |
55 | 55 | #endif |
56 | 56 | initprimes("PRIMES",0); |
57 | 57 | cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) |
47 | 47 | int main() |
48 | 48 | { |
49 | 49 | show_version(); |
50 | set_precision(20); | |
50 | set_precision(50); | |
51 | 51 | #ifdef TIMINGS |
52 | 52 | init_time(); |
53 | 53 | #endif |
27 | 27 | int main(){ |
28 | 28 | cerr<<"Program to find and/or count torsion on a curve.\n\n"; |
29 | 29 | #ifdef NTL_ALL |
30 | set_precision("Enter number of decimal places"); | |
30 | set_precision("Enter precision in bits"); | |
31 | 31 | #endif |
32 | 32 | cerr<<"Enter 0 for short output (#torsion only)\n"; |
33 | 33 | cerr<<" or 1 for long output (list of the torsion points): "; |
28 | 28 | |
29 | 29 | int main(){ |
30 | 30 | #ifdef NTL_ALL |
31 | set_precision("Enter number of decimal places"); | |
31 | set_precision("Enter precision in bits"); | |
32 | 32 | #endif |
33 | 33 | initprimes("PRIMES",0); |
34 | 34 |
24 | 24 | #include <eclib/points.h> |
25 | 25 | |
26 | 26 | int main(){ |
27 | // set_precision("Enter number of decimal places"); | |
28 | set_precision(30); | |
27 | // set_precision("Enter precision in bits"); | |
28 | set_precision(100); | |
29 | 29 | initprimes("PRIMES",1); |
30 | 30 | |
31 | 31 | Curve c(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); |
44 | 44 | |
45 | 45 | int main() |
46 | 46 | { |
47 | // set_precision("Enter number of decimal places"); | |
48 | set_precision(200); | |
47 | // set_precision("Enter precision in bits"); | |
48 | set_precision(600); | |
49 | 49 | initprimes("PRIMES",0); |
50 | 50 | int verbose = 1; |
51 | 51 | cout<<"verbose (0/1)? "; cin >>verbose; |