In[]:=
Pause[100]
In[]:=
Print["Start time is ",ds=DateString[],"."];prec=300000;(**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 Thu 21 Mar 2024 12:50:45.
Iterations required: 397978
Will give 195 time estimates, each more accurate than the previous.
Will stop at 399360 iterations to ensure precsion of around 301499 decimal places.
0 iterations done in 33.01 seconds. Should take 1.521× days or 1.314×s, finish Sat 26 May 6187 15:41:02.
6
10
11
10
2048 iterations done in 65.72 seconds. Should take 0.1478 days or 1.277×s, finish Thu 21 Mar 2024 16:23:36.
4
10
4096 iterations done in 98.94 seconds. Should take 0.1113 days or 9614.s, finish Thu 21 Mar 2024 15:30:58.
6144 iterations done in 131.8 seconds. Should take 0.09884 days or 8540.s, finish Thu 21 Mar 2024 15:13:04.
8192 iterations done in 165.0 seconds. Should take 0.09276 days or 8014.s, finish Thu 21 Mar 2024 15:04:19.
10240 iterations done in 198.7 seconds. Should take 0.08939 days or 7724.s, finish Thu 21 Mar 2024 14:59:28.
12288 iterations done in 232.0 seconds. Should take 0.08697 days or 7514.s, finish Thu 21 Mar 2024 14:55:59.
14336 iterations done in 265.5 seconds. Should take 0.08531 days or 7371.s, finish Thu 21 Mar 2024 14:53:35.
16384 iterations done in 299.0 seconds. Should take 0.08406 days or 7263.s, finish Thu 21 Mar 2024 14:51:47.
18432 iterations done in 333.1 seconds. Should take 0.08324 days or 7192.s, finish Thu 21 Mar 2024 14:50:36.
20480 iterations done in 367.3 seconds. Should take 0.08262 days or 7138.s, finish Thu 21 Mar 2024 14:49:43.
22528 iterations done in 401.3 seconds. Should take 0.08205 days or 7089.s, finish Thu 21 Mar 2024 14:48:53.
24576 iterations done in 435.2 seconds. Should take 0.08157 days or 7047.s, finish Thu 21 Mar 2024 14:48:12.
26624 iterations done in 468.9 seconds. Should take 0.08112 days or 7009.s, finish Thu 21 Mar 2024 14:47:34.
28672 iterations done in 502.9 seconds. Should take 0.08078 days or 6980.s, finish Thu 21 Mar 2024 14:47:04.
30720 iterations done in 537.3 seconds. Should take 0.08056 days or 6961.s, finish Thu 21 Mar 2024 14:46:45.
32768 iterations done in 571.0 seconds. Should take 0.08027 days or 6935.s, finish Thu 21 Mar 2024 14:46:20.
34816 iterations done in 605.5 seconds. Should take 0.08011 days or 6921.s, finish Thu 21 Mar 2024 14:46:06.
36864 iterations done in 639.5 seconds. Should take 0.07991 days or 6904.s, finish Thu 21 Mar 2024 14:45:49.
38912 iterations done in 673.7 seconds. Should take 0.07975 days or 6890.s, finish Thu 21 Mar 2024 14:45:35.
40960 iterations done in 707.8 seconds. Should take 0.07959 days or 6877.s, finish Thu 21 Mar 2024 14:45:21.
43008 iterations done in 742.1 seconds. Should take 0.07948 days or 6867.s, finish Thu 21 Mar 2024 14:45:12.
45056 iterations done in 776.3 seconds. Should take 0.07936 days or 6857.s, finish Thu 21 Mar 2024 14:45:01.
47104 iterations done in 810.9 seconds. Should take 0.07930 days or 6851.s, finish Thu 21 Mar 2024 14:44:56.
49152 iterations done in 845.2 seconds. Should take 0.07920 days or 6843.s, finish Thu 21 Mar 2024 14:44:48.
51200 iterations done in 879.8 seconds. Should take 0.07915 days or 6838.s, finish Thu 21 Mar 2024 14:44:43.
53248 iterations done in 914.0 seconds. Should take 0.07907 days or 6831.s, finish Thu 21 Mar 2024 14:44:36.
55296 iterations done in 949.1 seconds. Should take 0.07906 days or 6831.s, finish Thu 21 Mar 2024 14:44:36.
57344 iterations done in 984.1 seconds. Should take 0.07905 days or 6830.s, finish Thu 21 Mar 2024 14:44:34.
59392 iterations done in 1019. seconds. Should take 0.07904 days or 6829.s, finish Thu 21 Mar 2024 14:44:34.
61440 iterations done in 1054. seconds. Should take 0.07905 days or 6830.s, finish Thu 21 Mar 2024 14:44:34.
63488 iterations done in 1090. seconds. Should take 0.07907 days or 6832.s, finish Thu 21 Mar 2024 14:44:36.
65536 iterations done in 1125. seconds. Should take 0.07908 days or 6832.s, finish Thu 21 Mar 2024 14:44:37.
67584 iterations done in 1160. seconds. Should take 0.07906 days or 6831.s, finish Thu 21 Mar 2024 14:44:35.
69632 iterations done in 1195. seconds. Should take 0.07905 days or 6830.s, finish Thu 21 Mar 2024 14:44:35.
71680 iterations done in 1230. seconds. Should take 0.07905 days or 6830.s, finish Thu 21 Mar 2024 14:44:35.
73728 iterations done in 1265. seconds. Should take 0.07904 days or 6829.s, finish Thu 21 Mar 2024 14:44:34.
75776 iterations done in 1301. seconds. Should take 0.07907 days or 6832.s, finish Thu 21 Mar 2024 14:44:36.
77824 iterations done in 1337. seconds. Should take 0.07912 days or 6836.s, finish Thu 21 Mar 2024 14:44:40.
79872 iterations done in 1372. seconds. Should take 0.07915 days or 6838.s, finish Thu 21 Mar 2024 14:44:43.
81920 iterations done in 1408. seconds. Should take 0.07916 days or 6839.s, finish Thu 21 Mar 2024 14:44:44.
83968 iterations done in 1444. seconds. Should take 0.07922 days or 6845.s, finish Thu 21 Mar 2024 14:44:49.
86016 iterations done in 1480. seconds. Should take 0.07928 days or 6849.s, finish Thu 21 Mar 2024 14:44:54.
88064 iterations done in 1517. seconds. Should take 0.07933 days or 6854.s, finish Thu 21 Mar 2024 14:44:58.
90112 iterations done in 1552. seconds. Should take 0.07935 days or 6856.s, finish Thu 21 Mar 2024 14:45:00.
92160 iterations done in 1588. seconds. Should take 0.07939 days or 6859.s, finish Thu 21 Mar 2024 14:45:04.
94208 iterations done in 1625. seconds. Should take 0.07946 days or 6866.s, finish Thu 21 Mar 2024 14:45:10.
96256 iterations done in 1662. seconds. Should take 0.07953 days or 6872.s, finish Thu 21 Mar 2024 14:45:16.
98304 iterations done in 1698. seconds. Should take 0.07958 days or 6876.s, finish Thu 21 Mar 2024 14:45:20.
100352 iterations done in 1734. seconds. Should take 0.07961 days or 6878.s, finish Thu 21 Mar 2024 14:45:23.
102400 iterations done in 1770. seconds. Should take 0.07963 days or 6880.s, finish Thu 21 Mar 2024 14:45:24.
104448 iterations done in 1806. seconds. Should take 0.07967 days or 6883.s, finish Thu 21 Mar 2024 14:45:28.
106496 iterations done in 1843. seconds. Should take 0.07972 days or 6888.s, finish Thu 21 Mar 2024 14:45:32.
108544 iterations done in 1879. seconds. Should take 0.07975 days or 6891.s, finish Thu 21 Mar 2024 14:45:35.
110592 iterations done in 1917. seconds. Should take 0.07984 days or 6898.s, finish Thu 21 Mar 2024 14:45:43.
112640 iterations done in 1953. seconds. Should take 0.07988 days or 6902.s, finish Thu 21 Mar 2024 14:45:46.
114688 iterations done in 1990. seconds. Should take 0.07993 days or 6906.s, finish Thu 21 Mar 2024 14:45:51.