In[]:=
Print["Start time is ",ds=DateString[],"."];prec=1000000;(**Numberofrequireddecimals.*.*)ClearSystemCache[];T0=SessionTime[];expM[pre_]:=Module[{a,d,s,k,bb,c,end,iprec,xvals,x,pc,cores=16(*=4*numberofphysicalcores*),tsize=2^7,chunksize,start=1,ll,ctab,pr=Floor[1.005pre]},chunksize=cores*tsize;n=Floor[1.32pr];end=Ceiling[n/chunksize];Print["Iterations required: ",n];Print["Will give ",end," time estimates, each more accurate than the previous."];Print["Will stop at ",end*chunksize," iterations to ensure precsion of around ",pr," decimal places."];d=ChebyshevT[n,3];{b,c,s}={SetPrecision[-1,1.1*n],-d,0};iprec=Ceiling[pr/6912];Do[xvals=Flatten[Parallelize[Table[Table[ll=start+j*tsize+l;x=N[E^(Log[ll]/(ll)),iprec];pc=iprec;While[pc<pr/1024,pc=Min[3pc,pr/1024];x=SetPrecision[x,pc];y=x^ll-ll;x=x(1-2y/((ll+1)y+2llll));];(**N[Exp[Log[ll]/ll],pr/1024]**)x=SetPrecision[x,pr/256];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/256](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/256]ll(ll-1)1/(3llt2+t^3z));(*N[Exp[Log[ll]/ll],pr/256]*)x=SetPrecision[x,pr/64];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/64](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/64]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/64]**)x=SetPrecision[x,pr/16];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/16](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/16]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/16]**)x=SetPrecision[x,pr/4];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr/4](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr/4]ll(ll-1)1/(3llt2+t^3z));(**N[Exp[Log[ll]/ll],pr/4]**)x=SetPrecision[x,pr];xll=x^ll;z=(ll-xll)/xll;t=2ll-1;t2=t^2;x=x*(1+SetPrecision[4.5,pr](ll-1)/t2+(ll+1)z/(2llt)-SetPrecision[13.5,pr]ll(ll-1)1/(3llt2+t^3z));(*N[Exp[Log[ll]/ll],pr]*)x,{l,0,tsize-1}],{j,0,cores-1}]]];ctab=ParallelTable[Table[c=b-c;ll=start+l-2;b*=2(ll+n)(ll-n)/((ll+1)(2ll+1));c,{l,chunksize}],Method"Automatic"];s+=ctab.(xvals-1);start+=chunksize;st=SessionTime[]-T0;kc=k*chunksize;ti=(st)/(kc+10^-4)*(n)/(3600)/(24);Print[kc," iterations done in ",N[st,4]," seconds."," Should take ",N[ti,4]," days or ",N[ti*24*3600,4],"s, finish ",DatePlus[ds,ti],"."],{k,0,end-1}];N[-s/d,pr]];t2=Timing[MRBtest2=expM[prec];];Print["Finished on ",DateString[],". Proccessor time was ",t2[[1]]," s."];Print["Actual time was ",st];(*Print[*)MRBtest2(*]*)(*Remove(**)orenterMRBtest2toprintoutput*);Print["Enter MRBtest2 to print ",Floor[Precision[MRBtest2]]," digits"];Print["If you saved m3M, the difference between this and 3,014,991 known digits is ",N[MRBtest2-m3M,10]]
Start time is Sun 27 Nov 2022 14:24:43.
Iterations required: 1326598
Will give 648 time estimates, each more accurate than the previous.
Will stop at 1327104 iterations to ensure precsion of around 1004999 decimal places.
0 iterations done in 143.4 seconds. Should take 2.201× days or 1.902×s, finish Fri 17 Mar 62293 07:10:10.
7
10
12
10
2048 iterations done in 288.2 seconds. Should take 2.161 days or 1.867×s, finish Tue 29 Nov 2022 18:16:12.
5
10
4096 iterations done in 434.1 seconds. Should take 1.627 days or 1.406×s, finish Tue 29 Nov 2022 05:27:48.
5
10
6144 iterations done in 582.1 seconds. Should take 1.455 days or 1.257×s, finish Tue 29 Nov 2022 01:19:33.
5
10
8192 iterations done in 731.3 seconds. Should take 1.371 days or 1.184×s, finish Mon 28 Nov 2022 23:18:31.
5
10
10240 iterations done in 883.1 seconds. Should take 1.324 days or 1.144×s, finish Mon 28 Nov 2022 22:11:32.
5
10
12288 iterations done in 1034. seconds. Should take 1.292 days or 1.116×s, finish Mon 28 Nov 2022 21:25:30.
5
10
14336 iterations done in 1187. seconds. Should take 1.271 days or 1.098×s, finish Mon 28 Nov 2022 20:55:14.
5
10
16384 iterations done in 1338. seconds. Should take 1.254 days or 1.083×s, finish Mon 28 Nov 2022 20:30:21.
5
10
18432 iterations done in 1489. seconds. Should take 1.241 days or 1.072×s, finish Mon 28 Nov 2022 20:11:20.
5
10
20480 iterations done in 1642. seconds. Should take 1.231 days or 1.063×s, finish Mon 28 Nov 2022 19:56:58.
5
10
22528 iterations done in 1795. seconds. Should take 1.224 days or 1.057×s, finish Mon 28 Nov 2022 19:46:45.
5
10
24576 iterations done in 1950. seconds. Should take 1.218 days or 1.052×s, finish Mon 28 Nov 2022 19:38:46.
5
10
26624 iterations done in 2105. seconds. Should take 1.214 days or 1.049×s, finish Mon 28 Nov 2022 19:33:12.
5
10
28672 iterations done in 2260. seconds. Should take 1.210 days or 1.046×s, finish Mon 28 Nov 2022 19:27:34.
5
10
30720 iterations done in 2418. seconds. Should take 1.208 days or 1.044×s, finish Mon 28 Nov 2022 19:24:45.
5
10
32768 iterations done in 2573. seconds. Should take 1.206 days or 1.042×s, finish Mon 28 Nov 2022 19:20:50.
5
10
34816 iterations done in 2730. seconds. Should take 1.204 days or 1.040×s, finish Mon 28 Nov 2022 19:18:26.
5
10
36864 iterations done in 2886. seconds. Should take 1.202 days or 1.039×s, finish Mon 28 Nov 2022 19:15:57.
5
10
38912 iterations done in 3045. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:14:44.
5
10
40960 iterations done in 3203. seconds. Should take 1.201 days or 1.037×s, finish Mon 28 Nov 2022 19:13:30.
5
10
43008 iterations done in 3364. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:13:58.
5
10
45056 iterations done in 3524. seconds. Should take 1.201 days or 1.037×s, finish Mon 28 Nov 2022 19:13:48.
5
10
47104 iterations done in 3685. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:14:12.
5
10
49152 iterations done in 3844. seconds. Should take 1.201 days or 1.037×s, finish Mon 28 Nov 2022 19:13:40.
5
10
51200 iterations done in 4005. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:14:04.
5
10
53248 iterations done in 4164. seconds. Should take 1.201 days or 1.037×s, finish Mon 28 Nov 2022 19:13:43.
5
10
55296 iterations done in 4325. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:14:03.
5
10
57344 iterations done in 4484. seconds. Should take 1.201 days or 1.037×s, finish Mon 28 Nov 2022 19:13:34.
5
10
59392 iterations done in 4647. seconds. Should take 1.201 days or 1.038×s, finish Mon 28 Nov 2022 19:14:45.
5
10
61440 iterations done in 4808. seconds. Should take 1.202 days or 1.038×s, finish Mon 28 Nov 2022 19:15:00.
5
10
63488 iterations done in 4975. seconds. Should take 1.203 days or 1.040×s, finish Mon 28 Nov 2022 19:17:15.
5
10
65536 iterations done in 5135. seconds. Should take 1.203 days or 1.039×s, finish Mon 28 Nov 2022 19:17:06.
5
10
67584 iterations done in 5299. seconds. Should take 1.204 days or 1.040×s, finish Mon 28 Nov 2022 19:18:13.
5
10
69632 iterations done in 5462. seconds. Should take 1.204 days or 1.041×s, finish Mon 28 Nov 2022 19:19:10.
5
10
71680 iterations done in 5629. seconds. Should take 1.206 days or 1.042×s, finish Mon 28 Nov 2022 19:20:55.
5
10
73728 iterations done in 5792. seconds. Should take 1.206 days or 1.042×s, finish Mon 28 Nov 2022 19:21:45.
5
10
75776 iterations done in 5961. seconds. Should take 1.208 days or 1.044×s, finish Mon 28 Nov 2022 19:23:54.
5
10
77824 iterations done in 6125. seconds. Should take 1.208 days or 1.044×s, finish Mon 28 Nov 2022 19:24:55.
5
10
79872 iterations done in 6296. seconds. Should take 1.210 days or 1.046×s, finish Mon 28 Nov 2022 19:27:30.
5
10
81920 iterations done in 6461. seconds. Should take 1.211 days or 1.046×s, finish Mon 28 Nov 2022 19:28:25.
5
10
83968 iterations done in 6630. seconds. Should take 1.212 days or 1.047×s, finish Mon 28 Nov 2022 19:30:32.
5
10
86016 iterations done in 6797. seconds. Should take 1.213 days or 1.048×s, finish Mon 28 Nov 2022 19:31:55.
5
10
88064 iterations done in 6968. seconds. Should take 1.215 days or 1.050×s, finish Mon 28 Nov 2022 19:34:14.
5
10
90112 iterations done in 7137. seconds. Should take 1.216 days or 1.051×s, finish Mon 28 Nov 2022 19:35:47.
5
10
92160 iterations done in 7309. seconds. Should take 1.218 days or 1.052×s, finish Mon 28 Nov 2022 19:38:06.
5
10
94208 iterations done in 7479. seconds. Should take 1.219 days or 1.053×s, finish Mon 28 Nov 2022 19:39:58.
5
10
96256 iterations done in 7651. seconds. Should take 1.221 days or 1.055×s, finish Mon 28 Nov 2022 19:42:15.
5
10
98304 iterations done in 7822. seconds. Should take 1.222 days or 1.056×s, finish Mon 28 Nov 2022 19:43:56.
5
10
100352 iterations done in 7991. seconds. Should take 1.223 days or 1.056×s, finish Mon 28 Nov 2022 19:45:20.
5
10
102400 iterations done in 8164. seconds. Should take 1.224 days or 1.058×s, finish Mon 28 Nov 2022 19:47:22.
5
10
104448 iterations done in 8337. seconds. Should take 1.226 days or 1.059×s, finish Mon 28 Nov 2022 19:49:33.
5
10
106496 iterations done in 8511. seconds. Should take 1.227 days or 1.060×s, finish Mon 28 Nov 2022 19:51:46.
5
10
108544 iterations done in 8684. seconds. Should take 1.228 days or 1.061×s, finish Mon 28 Nov 2022 19:53:33.
5
10
110592 iterations done in 8859. seconds. Should take 1.230 days or 1.063×s, finish Mon 28 Nov 2022 19:55:45.
5
10
112640 iterations done in 9033. seconds. Should take 1.231 days or 1.064×s, finish Mon 28 Nov 2022 19:57:45.
5
10
114688 iterations done in 9212. seconds. Should take 1.233 days or 1.066×s, finish Mon 28 Nov 2022 20:00:42.
5
10
116736 iterations done in 9386. seconds. Should take 1.234 days or 1.067×s, finish Mon 28 Nov 2022 20:02:22.
5
10
118784 iterations done in 9565. seconds. Should take 1.236 days or 1.068×s, finish Mon 28 Nov 2022 20:05:04.
5
10
120832 iterations done in 9740. seconds. Should take 1.238 days or 1.069×s, finish Mon 28 Nov 2022 20:06:52.
5
10
122880 iterations done in 9919. seconds. Should take 1.239 days or 1.071×s, finish Mon 28 Nov 2022 20:09:24.
5
10
124928 iterations done in 1.009× seconds. Should take 1.241 days or 1.072×s, finish Mon 28 Nov 2022 20:11:07.
4
10
5
10
126976 iterations done in 1.028× seconds. Should take 1.243 days or 1.074×s, finish Mon 28 Nov 2022 20:13:55.
4
10
5
10
129024 iterations done in 1.045× seconds. Should take 1.244 days or 1.075×s, finish Mon 28 Nov 2022 20:16:09.
4
10
5
10
131072 iterations done in 1.063× seconds. Should take 1.246 days or 1.076×s, finish Mon 28 Nov 2022 20:18:21.
4
10
5
10
133120 iterations done in 1.081× seconds. Should take 1.247 days or 1.077×s, finish Mon 28 Nov 2022 20:20:24.
4
10
5
10
135168 iterations done in 1.099× seconds. Should take 1.249 days or 1.079×s, finish Mon 28 Nov 2022 20:22:54.
4
10
5
10
137216 iterations done in 1.117× seconds. Should take 1.250 days or 1.080×s, finish Mon 28 Nov 2022 20:25:11.
4
10
5
10