In[]:=
CloseKernels[]
Out[]=
{}
In[]:=
Needs["SubKernels`LocalKernels`"]Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
Out[]=
{KernelObject[1,WIN-1AA39U1LQNT],KernelObject[2,WIN-1AA39U1LQNT],KernelObject[3,WIN-1AA39U1LQNT],KernelObject[4,WIN-1AA39U1LQNT],KernelObject[5,WIN-1AA39U1LQNT],KernelObject[6,WIN-1AA39U1LQNT],KernelObject[7,WIN-1AA39U1LQNT],KernelObject[8,WIN-1AA39U1LQNT],KernelObject[9,DigitalStorm-PC],KernelObject[10,DigitalStorm-PC],KernelObject[11,DigitalStorm-PC],KernelObject[12,DigitalStorm-PC],KernelObject[13,DigitalStorm-PC],KernelObject[14,DigitalStorm-PC],KernelObject[15,DESKTOP-0U8UH9R],KernelObject[16,DESKTOP-0U8UH9R],KernelObject[17,DESKTOP-0U8UH9R],KernelObject[18,DESKTOP-0U8UH9R],KernelObject[19,DESKTOP-0U8UH9R],KernelObject[20,DESKTOP-0U8UH9R],KernelObject[21,DESKTOP-0U8UH9R],KernelObject[22,DESKTOP-0U8UH9R],KernelObject[23,DESKTOP-0U8UH9R],KernelObject[24,DESKTOP-0U8UH9R],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],KernelObject[41,local],KernelObject[42,local],KernelObject[43,local],KernelObject[44,local],KernelObject[45,local],KernelObject[46,local],KernelObject[47,local],KernelObject[48,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 Thu 7 Jul 2022 06:50:50.
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.774 seconds. Should take 1.501× days or 1.297×s, finish Thu 19 May 2433 13:11:06.
5
10
10
10
2048 iterations done in 20.14 seconds. Should take 0.01510 days or 1305.s, finish Thu 7 Jul 2022 07:12:34.
4096 iterations done in 30.50 seconds. Should take 0.01143 days or 987.8s, finish Thu 7 Jul 2022 07:07:17.
6144 iterations done in 40.88 seconds. Should take 0.01022 days or 882.7s, finish Thu 7 Jul 2022 07:05:32.
8192 iterations done in 51.26 seconds. Should take 0.009607 days or 830.0s, finish Thu 7 Jul 2022 07:04:40.
10240 iterations done in 61.87 seconds. Should take 0.009276 days or 801.5s, finish Thu 7 Jul 2022 07:04:11.
12288 iterations done in 72.44 seconds. Should take 0.009051 days or 782.0s, finish Thu 7 Jul 2022 07:03:52.
14336 iterations done in 83.23 seconds. Should take 0.008914 days or 770.2s, finish Thu 7 Jul 2022 07:03:40.
16384 iterations done in 93.89 seconds. Should take 0.008799 days or 760.2s, finish Thu 7 Jul 2022 07:03:30.
18432 iterations done in 104.5 seconds. Should take 0.008707 days or 752.3s, finish Thu 7 Jul 2022 07:03:22.
20480 iterations done in 115.3 seconds. Should take 0.008641 days or 746.6s, finish Thu 7 Jul 2022 07:03:16.
22528 iterations done in 126.1 seconds. Should take 0.008592 days or 742.3s, finish Thu 7 Jul 2022 07:03:12.
24576 iterations done in 136.5 seconds. Should take 0.008526 days or 736.7s, finish Thu 7 Jul 2022 07:03:06.
26624 iterations done in 147.1 seconds. Should take 0.008481 days or 732.8s, finish Thu 7 Jul 2022 07:03:02.
28672 iterations done in 157.8 seconds. Should take 0.008449 days or 730.0s, finish Thu 7 Jul 2022 07:02:59.
30720 iterations done in 168.5 seconds. Should take 0.008423 days or 727.7s, finish Thu 7 Jul 2022 07:02:57.
32768 iterations done in 179.3 seconds. Should take 0.008401 days or 725.9s, finish Thu 7 Jul 2022 07:02:55.
34816 iterations done in 189.9 seconds. Should take 0.008373 days or 723.5s, finish Thu 7 Jul 2022 07:02:53.
36864 iterations done in 200.9 seconds. Should take 0.008368 days or 723.0s, finish Thu 7 Jul 2022 07:02:53.