In[]:=
Needs["SubKernels`LocalKernels`"]Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
Out[]=
{$Failed,KernelObject[1,DigitalStorm-PC],KernelObject[2,DigitalStorm-PC],KernelObject[3,DigitalStorm-PC],KernelObject[4,DigitalStorm-PC],KernelObject[5,DigitalStorm-PC],KernelObject[6,DigitalStorm-PC],KernelObject[7,DESKTOP-0U8UH9R],KernelObject[8,DESKTOP-0U8UH9R],KernelObject[9,DESKTOP-0U8UH9R],KernelObject[10,DESKTOP-0U8UH9R],KernelObject[11,DESKTOP-0U8UH9R],KernelObject[12,DESKTOP-0U8UH9R],KernelObject[13,DESKTOP-0U8UH9R],KernelObject[14,DESKTOP-0U8UH9R],KernelObject[15,DESKTOP-0U8UH9R],KernelObject[16,DESKTOP-0U8UH9R],KernelObject[17,local],KernelObject[18,local],KernelObject[19,local],KernelObject[20,local],KernelObject[21,local],KernelObject[22,local],KernelObject[23,local],KernelObject[24,local],KernelObject[25,local],KernelObject[26,local],KernelObject[27,local],KernelObject[28,local],KernelObject[29,local],KernelObject[30,local],KernelObject[31,local],KernelObject[32,local],KernelObject[33,local],KernelObject[34,local],KernelObject[35,local],KernelObject[36,local],KernelObject[37,local],KernelObject[38,local],KernelObject[39,local],KernelObject[40,local]}
In[]:=
Print["Start time is ",ds=DateString[],"."];prec=100000;(**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 31 Jul 2022 01:33:22.
Iterations required: 132658
Will give 65 time estimates, each more accurate than the previous.
Will stop at 133120 iterations to ensure precsion of around 100499 decimal places.
0 iterations done in 9.573 seconds. Should take 1.470× days or 1.270×s, finish Mon 30 Dec 2424 03:57:28.
5
10
10
10
2048 iterations done in 19.80 seconds. Should take 0.01485 days or 1283.s, finish Sun 31 Jul 2022 01:54:44.
4096 iterations done in 30.11 seconds. Should take 0.01129 days or 975.1s, finish Sun 31 Jul 2022 01:49:37.
6144 iterations done in 40.48 seconds. Should take 0.01012 days or 874.0s, finish Sun 31 Jul 2022 01:47:56.
8192 iterations done in 50.87 seconds. Should take 0.009534 days or 823.8s, finish Sun 31 Jul 2022 01:47:05.
10240 iterations done in 61.45 seconds. Should take 0.009214 days or 796.1s, finish Sun 31 Jul 2022 01:46:38.
12288 iterations done in 71.89 seconds. Should take 0.008982 days or 776.1s, finish Sun 31 Jul 2022 01:46:18.
14336 iterations done in 82.39 seconds. Should take 0.008824 days or 762.4s, finish Sun 31 Jul 2022 01:46:04.
16384 iterations done in 92.99 seconds. Should take 0.008714 days or 752.9s, finish Sun 31 Jul 2022 01:45:54.
18432 iterations done in 103.6 seconds. Should take 0.008631 days or 745.8s, finish Sun 31 Jul 2022 01:45:47.
20480 iterations done in 114.2 seconds. Should take 0.008562 days or 739.8s, finish Sun 31 Jul 2022 01:45:41.
22528 iterations done in 124.9 seconds. Should take 0.008512 days or 735.5s, finish Sun 31 Jul 2022 01:45:37.
24576 iterations done in 135.2 seconds. Should take 0.008448 days or 729.9s, finish Sun 31 Jul 2022 01:45:31.
26624 iterations done in 145.5 seconds. Should take 0.008392 days or 725.1s, finish Sun 31 Jul 2022 01:45:27.
28672 iterations done in 156.1 seconds. Should take 0.008357 days or 722.1s, finish Sun 31 Jul 2022 01:45:24.
30720 iterations done in 166.6 seconds. Should take 0.008328 days or 719.5s, finish Sun 31 Jul 2022 01:45:21.
32768 iterations done in 177.0 seconds. Should take 0.008295 days or 716.7s, finish Sun 31 Jul 2022 01:45:18.
34816 iterations done in 187.6 seconds. Should take 0.008274 days or 714.9s, finish Sun 31 Jul 2022 01:45:16.
36864 iterations done in 198.2 seconds. Should take 0.008257 days or 713.4s, finish Sun 31 Jul 2022 01:45:15.
38912 iterations done in 208.9 seconds. Should take 0.008243 days or 712.2s, finish Sun 31 Jul 2022 01:45:14.
40960 iterations done in 219.4 seconds. Should take 0.008224 days or 710.5s, finish Sun 31 Jul 2022 01:45:12.
43008 iterations done in 230.1 seconds. Should take 0.008216 days or 709.8s, finish Sun 31 Jul 2022 01:45:11.
45056 iterations done in 240.8 seconds. Should take 0.008207 days or 709.1s, finish Sun 31 Jul 2022 01:45:11.
47104 iterations done in 251.5 seconds. Should take 0.008197 days or 708.2s, finish Sun 31 Jul 2022 01:45:10.
49152 iterations done in 262.0 seconds. Should take 0.008185 days or 707.2s, finish Sun 31 Jul 2022 01:45:09.
51200 iterations done in 272.7 seconds. Should take 0.008176 days or 706.4s, finish Sun 31 Jul 2022 01:45:08.
53248 iterations done in 283.2 seconds. Should take 0.008167 days or 705.6s, finish Sun 31 Jul 2022 01:45:07.
55296 iterations done in 293.9 seconds. Should take 0.008160 days or 705.0s, finish Sun 31 Jul 2022 01:45:07.
57344 iterations done in 304.3 seconds. Should take 0.008148 days or 704.0s, finish Sun 31 Jul 2022 01:45:05.
59392 iterations done in 314.7 seconds. Should take 0.008137 days or 703.0s, finish Sun 31 Jul 2022 01:45:04.
61440 iterations done in 325.2 seconds. Should take 0.008128 days or 702.3s, finish Sun 31 Jul 2022 01:45:04.
63488 iterations done in 335.8 seconds. Should take 0.008121 days or 701.7s, finish Sun 31 Jul 2022 01:45:03.
65536 iterations done in 346.4 seconds. Should take 0.008115 days or 701.2s, finish Sun 31 Jul 2022 01:45:03.
67584 iterations done in 356.8 seconds. Should take 0.008105 days or 700.3s, finish Sun 31 Jul 2022 01:45:02.
69632 iterations done in 367.2 seconds. Should take 0.008098 days or 699.6s, finish Sun 31 Jul 2022 01:45:01.
71680 iterations done in 377.7 seconds. Should take 0.008091 days or 699.1s, finish Sun 31 Jul 2022 01:45:01.
73728 iterations done in 388.3 seconds. Should take 0.008086 days or 698.7s, finish Sun 31 Jul 2022 01:45:00.
75776 iterations done in 398.8 seconds. Should take 0.008081 days or 698.2s, finish Sun 31 Jul 2022 01:45:00.
77824 iterations done in 409.3 seconds. Should take 0.008076 days or 697.7s, finish Sun 31 Jul 2022 01:44:59.
79872 iterations done in 420.0 seconds. Should take 0.008074 days or 697.6s, finish Sun 31 Jul 2022 01:44:59.
81920 iterations done in 430.6 seconds. Should take 0.008070 days or 697.2s, finish Sun 31 Jul 2022 01:44:59.
83968 iterations done in 441.2 seconds. Should take 0.008068 days or 697.0s, finish Sun 31 Jul 2022 01:44:59.
86016 iterations done in 451.9 seconds. Should take 0.008066 days or 696.9s, finish Sun 31 Jul 2022 01:44:58.
88064 iterations done in 462.6 seconds. Should take 0.008066 days or 696.9s, finish Sun 31 Jul 2022 01:44:58.
90112 iterations done in 473.1 seconds. Should take 0.008061 days or 696.4s, finish Sun 31 Jul 2022 01:44:58.
92160 iterations done in 483.7 seconds. Should take 0.008058 days or 696.2s, finish Sun 31 Jul 2022 01:44:58.
94208 iterations done in 494.2 seconds. Should take 0.008054 days or 695.9s, finish Sun 31 Jul 2022 01:44:57.
96256 iterations done in 504.8 seconds. Should take 0.008052 days or 695.7s, finish Sun 31 Jul 2022 01:44:57.
98304 iterations done in 515.3 seconds. Should take 0.008048 days or 695.3s, finish Sun 31 Jul 2022 01:44:57.
100352 iterations done in 525.7 seconds. Should take 0.008043 days or 694.9s, finish Sun 31 Jul 2022 01:44:56.
102400 iterations done in 536.1 seconds. Should take 0.008039 days or 694.5s, finish Sun 31 Jul 2022 01:44:56.
104448 iterations done in 546.5 seconds. Should take 0.008034 days or 694.1s, finish Sun 31 Jul 2022 01:44:56.
106496 iterations done in 556.9 seconds. Should take 0.008029 days or 693.7s, finish Sun 31 Jul 2022 01:44:55.