In[]:=
CloseKernels[]
Out[]=
{}
In[]:=
9
Out[]=
9
In[]:=
Needs["SubKernels`LocalKernels`"]​​Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
LinkObject
:Unable to communicate with closed link LinkObject[52595@192.168.1.222,52596@192.168.1.222,435,20].
Parallel`Developer`ConnectKernel
::failinit
:1 of 8 kernels failed to initialize.
LightweightGridClient`RemoteKernelClose
::nokernel
:Kernel could not be closed because no kernel was found for the given link "
DESKTOP-TLQ2UBE
.
LinkObject
:Unable to communicate with closed link LinkObject[51607@192.168.1.228,51608@192.168.1.228,456,20].
LinkObject
:Unable to communicate with closed link LinkObject[51611@192.168.1.228,51613@192.168.1.228,457,26].
General
:Further output of LinkObject::linkd will be suppressed during this calculation.
Parallel`Developer`ConnectKernel
::failinit
:2 of 8 kernels failed to initialize.
LightweightGridClient`RemoteKernelClose
::nokernel
:Kernel could not be closed because no kernel was found for the given link "
DESKTOP-0U8UH9R
.
LightweightGridClient`RemoteKernelClose
::nokernel
:Kernel could not be closed because no kernel was found for the given link "
DESKTOP-0U8UH9R
.
General
:Further output of LightweightGridClient`RemoteKernelClose::nokernel will be suppressed during this calculation.
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,DESKTOP-TLQ2UBE],KernelObject[10,DESKTOP-TLQ2UBE],KernelObject[12,DESKTOP-TLQ2UBE],KernelObject[13,DESKTOP-TLQ2UBE],KernelObject[14,DESKTOP-TLQ2UBE],KernelObject[15,DESKTOP-TLQ2UBE],KernelObject[16,DESKTOP-TLQ2UBE],KernelObject[19,DESKTOP-0U8UH9R],KernelObject[20,DESKTOP-0U8UH9R],KernelObject[21,DESKTOP-0U8UH9R],KernelObject[22,DESKTOP-0U8UH9R],KernelObject[23,DESKTOP-0U8UH9R],KernelObject[24,DESKTOP-0U8UH9R]}
In[]:=
Print["Start time is ",ds=DateString[],"."];​​prec=20000;​​(**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 Tue 29 Nov 2022 08:47:25.
Iterations required: 26530
Will give 13 time estimates, each more accurate than the previous.
Will stop at 26624 iterations to ensure precsion of around 20099 decimal places.
0 iterations done in 1.344 seconds. Should take 4127. days or 3.565×
8
10
s, finish Sat 18 Mar 2034 00:42:51.
2048 iterations done in 2.697 seconds. Should take 0.0004043 days or 34.93s, finish Tue 29 Nov 2022 08:47:59.
4096 iterations done in 4.017 seconds. Should take 0.0003011 days or 26.02s, finish Tue 29 Nov 2022 08:47:51.
6144 iterations done in 5.337 seconds. Should take 0.0002667 days or 23.05s, finish Tue 29 Nov 2022 08:47:48.
8192 iterations done in 6.698 seconds. Should take 0.0002511 days or 21.69s, finish Tue 29 Nov 2022 08:47:46.
10240 iterations done in 8.074 seconds. Should take 0.0002421 days or 20.92s, finish Tue 29 Nov 2022 08:47:45.
12288 iterations done in 9.395 seconds. Should take 0.0002348 days or 20.28s, finish Tue 29 Nov 2022 08:47:45.
14336 iterations done in 10.74 seconds. Should take 0.0002300 days or 19.87s, finish Tue 29 Nov 2022 08:47:44.
16384 iterations done in 12.04 seconds. Should take 0.0002257 days or 19.50s, finish Tue 29 Nov 2022 08:47:44.
18432 iterations done in 13.39 seconds. Should take 0.0002230 days or 19.27s, finish Tue 29 Nov 2022 08:47:44.
20480 iterations done in 14.68 seconds. Should take 0.0002202 days or 19.02s, finish Tue 29 Nov 2022 08:47:44.
22528 iterations done in 15.97 seconds. Should take 0.0002177 days or 18.81s, finish Tue 29 Nov 2022 08:47:43.
24576 iterations done in 17.27 seconds. Should take 0.0002158 days or 18.64s, finish Tue 29 Nov 2022 08:47:43.
Finished on Tue 29 Nov 2022 08:47:42. Proccessor time was 5.8125 s.
Actual time was 17.2689333
Enter MRBtest2 to print 20093 digits
If you saved m3M, the difference between this and 3,014,991 known digits is 0.1878596425-1.000000000m3M
In[]:=
Print["Start time is ",ds=DateString[],"."];​​prec=30000;​​(**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]]