In[]:=
Needs["SubKernels`LocalKernels`"]Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
Out[]=
{KernelObject[1,local],KernelObject[2,local],KernelObject[3,local],KernelObject[4,local],KernelObject[5,local],KernelObject[6,local],KernelObject[7,local],KernelObject[8,local],KernelObject[9,local],KernelObject[10,local],KernelObject[11,local],KernelObject[12,local],KernelObject[13,local],KernelObject[14,local],KernelObject[15,local],KernelObject[16,local],KernelObject[17,2600:1700:71d0:fd50:0:0:0:42],KernelObject[18,2600:1700:71d0:fd50:0:0:0:42],KernelObject[19,2600:1700:71d0:fd50:0:0:0:42],KernelObject[20,2600:1700:71d0:fd50:0:0:0:42],KernelObject[21,2600:1700:71d0:fd50:0:0:0:42],KernelObject[22,2600:1700:71d0:fd50:0:0:0:42],KernelObject[23,2600:1700:71d0:fd50:0:0:0:42],KernelObject[24,2600:1700:71d0:fd50:0:0:0:42],KernelObject[25,2600:1700:71d0:fd50:0:0:0:42],KernelObject[26,2600:1700:71d0:fd50:0:0:0:42],KernelObject[27,2600:1700:71d0:fd50:0:0:0:42],KernelObject[28,2600:1700:71d0:fd50:0:0:0:42],KernelObject[29,2600:1700:71d0:fd50:0:0:0:42],KernelObject[30,2600:1700:71d0:fd50:0:0:0:42],KernelObject[31,2600:1700:71d0:fd50:0:0:0:42],KernelObject[32,2600:1700:71d0:fd50:0:0:0:42]}
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/186624];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 Sat 23 Mar 2024 15:21:52.
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 124.8 seconds. Should take 1.917× days or 1.656×s, finish Tue 13 Apr 54500 04:36:22.
7
10
12
10
2048 iterations done in 260.7 seconds. Should take 1.954 days or 1.688×s, finish Mon 25 Mar 2024 14:15:54.
5
10
4096 iterations done in 398.3 seconds. Should take 1.493 days or 1.290×s, finish Mon 25 Mar 2024 03:11:57.
5
10
6144 iterations done in 540.1 seconds. Should take 1.350 days or 1.166×s, finish Sun 24 Mar 2024 23:45:31.
5
10
8192 iterations done in 680.7 seconds. Should take 1.276 days or 1.102×s, finish Sun 24 Mar 2024 21:59:11.
5
10
10240 iterations done in 823.9 seconds. Should take 1.235 days or 1.067×s, finish Sun 24 Mar 2024 21:00:54.
5
10
12288 iterations done in 967.7 seconds. Should take 1.209 days or 1.045×s, finish Sun 24 Mar 2024 20:22:58.
5
10
14336 iterations done in 1113. seconds. Should take 1.192 days or 1.030×s, finish Sun 24 Mar 2024 19:58:12.
5
10
16384 iterations done in 1258. seconds. Should take 1.179 days or 1.019×s, finish Sun 24 Mar 2024 19:39:37.
5
10
18432 iterations done in 1403. seconds. Should take 1.169 days or 1.010×s, finish Sun 24 Mar 2024 19:24:35.
5
10
20480 iterations done in 1550. seconds. Should take 1.162 days or 1.004×s, finish Sun 24 Mar 2024 19:15:02.
5
10
22528 iterations done in 1697. seconds. Should take 1.157 days or 9.995×s, finish Sun 24 Mar 2024 19:07:45.
4
10
24576 iterations done in 1845. seconds. Should take 1.153 days or 9.959×s, finish Sun 24 Mar 2024 19:01:41.
4
10
26624 iterations done in 1995. seconds. Should take 1.151 days or 9.941×s, finish Sun 24 Mar 2024 18:58:45.
4
10
28672 iterations done in 2144. seconds. Should take 1.148 days or 9.920×s, finish Sun 24 Mar 2024 18:55:14.
4
10
30720 iterations done in 2294. seconds. Should take 1.147 days or 9.907×s, finish Sun 24 Mar 2024 18:53:03.
4
10
32768 iterations done in 2442. seconds. Should take 1.144 days or 9.886×s, finish Sun 24 Mar 2024 18:49:31.
4
10
34816 iterations done in 2592. seconds. Should take 1.143 days or 9.877×s, finish Sun 24 Mar 2024 18:48:00.
4
10
36864 iterations done in 2739. seconds. Should take 1.141 days or 9.856×s, finish Sun 24 Mar 2024 18:44:32.
4
10
38912 iterations done in 2891. seconds. Should take 1.141 days or 9.855×s, finish Sun 24 Mar 2024 18:44:19.
4
10
40960 iterations done in 3042. seconds. Should take 1.140 days or 9.852×s, finish Sun 24 Mar 2024 18:43:53.
4
10
43008 iterations done in 3195. seconds. Should take 1.141 days or 9.855×s, finish Sun 24 Mar 2024 18:44:19.
4
10
45056 iterations done in 3347. seconds. Should take 1.141 days or 9.854×s, finish Sun 24 Mar 2024 18:44:13.
4
10
47104 iterations done in 3500. seconds. Should take 1.141 days or 9.858×s, finish Sun 24 Mar 2024 18:44:47.
4
10
49152 iterations done in 3650. seconds. Should take 1.140 days or 9.851×s, finish Sun 24 Mar 2024 18:43:42.
4
10
51200 iterations done in 3802. seconds. Should take 1.140 days or 9.850×s, finish Sun 24 Mar 2024 18:43:33.
4
10
53248 iterations done in 3955. seconds. Should take 1.141 days or 9.855×s, finish Sun 24 Mar 2024 18:44:17.
4
10
55296 iterations done in 4109. seconds. Should take 1.141 days or 9.858×s, finish Sun 24 Mar 2024 18:44:47.
4
10
57344 iterations done in 4261. seconds. Should take 1.141 days or 9.857×s, finish Sun 24 Mar 2024 18:44:37.
4
10
59392 iterations done in 4414. seconds. Should take 1.141 days or 9.860×s, finish Sun 24 Mar 2024 18:45:08.
4
10
61440 iterations done in 4570. seconds. Should take 1.142 days or 9.866×s, finish Sun 24 Mar 2024 18:46:15.
4
10
63488 iterations done in 4725. seconds. Should take 1.143 days or 9.872×s, finish Sun 24 Mar 2024 18:47:16.
4
10
65536 iterations done in 4876. seconds. Should take 1.142 days or 9.871×s, finish Sun 24 Mar 2024 18:46:59.
4
10
67584 iterations done in 5029. seconds. Should take 1.142 days or 9.871×s, finish Sun 24 Mar 2024 18:46:57.
4
10
69632 iterations done in 5181. seconds. Should take 1.142 days or 9.870×s, finish Sun 24 Mar 2024 18:46:54.
4
10
71680 iterations done in 5339. seconds. Should take 1.144 days or 9.880×s, finish Sun 24 Mar 2024 18:48:33.
4
10
73728 iterations done in 5491. seconds. Should take 1.144 days or 9.881×s, finish Sun 24 Mar 2024 18:48:40.
4
10
75776 iterations done in 5647. seconds. Should take 1.144 days or 9.887×s, finish Sun 24 Mar 2024 18:49:39.
4
10
77824 iterations done in 5803. seconds. Should take 1.145 days or 9.893×s, finish Sun 24 Mar 2024 18:50:37.
4
10
79872 iterations done in 5962. seconds. Should take 1.146 days or 9.903×s, finish Sun 24 Mar 2024 18:52:17.
4
10
81920 iterations done in 6118. seconds. Should take 1.147 days or 9.908×s, finish Sun 24 Mar 2024 18:53:10.
4
10
83968 iterations done in 6275. seconds. Should take 1.148 days or 9.915×s, finish Sun 24 Mar 2024 18:54:17.
4
10
86016 iterations done in 6434. seconds. Should take 1.148 days or 9.923×s, finish Sun 24 Mar 2024 18:55:40.
4
10
88064 iterations done in 6593. seconds. Should take 1.149 days or 9.931×s, finish Sun 24 Mar 2024 18:57:04.
4
10
90112 iterations done in 6752. seconds. Should take 1.150 days or 9.940×s, finish Sun 24 Mar 2024 18:58:32.
4
10
92160 iterations done in 6911. seconds. Should take 1.151 days or 9.948×s, finish Sun 24 Mar 2024 18:59:48.
4
10
94208 iterations done in 7071. seconds. Should take 1.152 days or 9.957×s, finish Sun 24 Mar 2024 19:01:23.
4
10
96256 iterations done in 7232. seconds. Should take 1.154 days or 9.967×s, finish Sun 24 Mar 2024 19:03:02.
4
10
98304 iterations done in 7392. seconds. Should take 1.155 days or 9.975×s, finish Sun 24 Mar 2024 19:04:24.
4
10
100352 iterations done in 7549. seconds. Should take 1.155 days or 9.979×s, finish Sun 24 Mar 2024 19:05:04.
4
10
102400 iterations done in 7711. seconds. Should take 1.156 days or 9.990×s, finish Sun 24 Mar 2024 19:06:50.
4
10
104448 iterations done in 7872. seconds. Should take 1.157 days or 9.998×s, finish Sun 24 Mar 2024 19:08:12.
4
10
106496 iterations done in 8035. seconds. Should take 1.158 days or 1.001×s, finish Sun 24 Mar 2024 19:09:57.
5
10
108544 iterations done in 8195. seconds. Should take 1.159 days or 1.002×s, finish Sun 24 Mar 2024 19:11:06.
5
10
110592 iterations done in 8359. seconds. Should take 1.161 days or 1.003×s, finish Sun 24 Mar 2024 19:13:06.
5
10
112640 iterations done in 8522. seconds. Should take 1.162 days or 1.004×s, finish Sun 24 Mar 2024 19:14:42.
5
10
114688 iterations done in 8689. seconds. Should take 1.163 days or 1.005×s, finish Sun 24 Mar 2024 19:17:01.
5
10
116736 iterations done in 8850. seconds. Should take 1.164 days or 1.006×s, finish Sun 24 Mar 2024 19:18:06.
5
10
118784 iterations done in 9015. seconds. Should take 1.165 days or 1.007×s, finish Sun 24 Mar 2024 19:19:54.
5
10