In[]:=
Print["Start time is ",ds=DateString[],"."];​​prec=50000;​​(**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/27];​​Do[xvals=Flatten[ParallelTable[Table[ll=start+j*tsize+l;​​x=N[E^(Log[ll]/(ll)),iprec];​​pc=iprec;​​While[pc<pr/4,pc=Min[3pc,pr/4];​​x=SetPrecision[x,pc];​​y=x^ll-ll;​​x=x(1-2y/((ll+1)y+2llll));];(**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},Method"EvaluationsPerKernel"32(*apowerof2commensuratewithavailableRAM*)]];​​ctab=ParallelTable[Table[c=b-c;​​ll=start+l-2;​​b*=2(ll+n)(ll-n)/((ll+1)(2ll+1));​​c,{l,chunksize}],Method"EvaluationsPerKernel"16(*apowerof2commensuratewithprocessorstrength*)];​​s+=ctab.(xvals-1);​​start+=chunksize;​​st=SessionTime[]-T0;kc=k*chunksize;​​ti=(st)/(kc+10^-4)*(n)/(3600)/(24);​​If[kc>1,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[*)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]]
24576 iterations done in 209.9 seconds. Should take 0.006556 days or 566.5s, finish Tue 17 Jan 2023 09:38:58.
26624 iterations done in 226.7 seconds. Should take 0.006537 days or 564.8s, finish Tue 17 Jan 2023 09:38:56.
28672 iterations done in 244.7 seconds. Should take 0.006552 days or 566.1s, finish Tue 17 Jan 2023 09:38:58.
30720 iterations done in 263.3 seconds. Should take 0.006580 days or 568.5s, finish Tue 17 Jan 2023 09:39:00.
32768 iterations done in 280.7 seconds. Should take 0.006576 days or 568.2s, finish Tue 17 Jan 2023 09:39:00.
34816 iterations done in 299.0 seconds. Should take 0.006594 days or 569.7s, finish Tue 17 Jan 2023 09:39:01.
36864 iterations done in 316.4 seconds. Should take 0.006588 days or 569.2s, finish Tue 17 Jan 2023 09:39:01.
38912 iterations done in 339.3 seconds. Should take 0.006694 days or 578.4s, finish Tue 17 Jan 2023 09:39:10.
40960 iterations done in 363.4 seconds. Should take 0.006811 days or 588.5s, finish Tue 17 Jan 2023 09:39:20.
43008 iterations done in 391.8 seconds. Should take 0.006994 days or 604.3s, finish Tue 17 Jan 2023 09:39:36.
45056 iterations done in 412.5 seconds. Should take 0.007029 days or 607.3s, finish Tue 17 Jan 2023 09:39:39.
47104 iterations done in 429.5 seconds. Should take 0.007000 days or 604.8s, finish Tue 17 Jan 2023 09:39:36.
49152 iterations done in 441.6 seconds. Should take 0.006897 days or 595.9s, finish Tue 17 Jan 2023 09:39:27.
51200 iterations done in 452.7 seconds. Should take 0.006788 days or 586.5s, finish Tue 17 Jan 2023 09:39:18.
53248 iterations done in 467.0 seconds. Should take 0.006733 days or 581.7s, finish Tue 17 Jan 2023 09:39:13.
55296 iterations done in 484.8 seconds. Should take 0.006731 days or 581.5s, finish Tue 17 Jan 2023 09:39:13.
57344 iterations done in 502.5 seconds. Should take 0.006727 days or 581.2s, finish Tue 17 Jan 2023 09:39:13.
59392 iterations done in 519.2 seconds. Should take 0.006711 days or 579.8s, finish Tue 17 Jan 2023 09:39:11.
61440 iterations done in 536.0 seconds. Should take 0.006697 days or 578.6s, finish Tue 17 Jan 2023 09:39:10.
63488 iterations done in 552.7 seconds. Should take 0.006684 days or 577.5s, finish Tue 17 Jan 2023 09:39:09.
65536 iterations done in 569.4 seconds. Should take 0.006670 days or 576.3s, finish Tue 17 Jan 2023 09:39:08.
Finished on Tue 17 Jan 2023 09:39:02. Proccessor time was 394.922 s.
Enter MRBtest2 to print 50243 digits
If you saved m3M, the difference between this and 3,014,991 known digits is 0.×
-50245
10
​​​​
In[]:=
m=MRBtest2;
In[]:=
N
2831837795627093270049019435735058074202709163295
160
2
-?(exp(mπ)),30
Out[]=
1.47659530698115960476575459867×
-22426
10
In[]:=
N
4
2
+1
3
2
-?exp
2
(5×2)
2
3
2
5
2+3
+mπ,30
Out[]=
1.60982313291470627728684635704×
-7018
10