Needs["SubKernels`LocalKernels`"]Block[{$mathkernel=$mathkernel<>" -threadpriority=2"},LaunchKernels[]]
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,local],KernelObject[10,local],KernelObject[11,local],KernelObject[12,local],KernelObject[13,local],KernelObject[14,local],KernelObject[15,local],KernelObject[16,local]}
ClearAll[RootPade6,expM,MRB1,MRB2,err,goodDigits];Clear[RootHalley3];RootHalley3[n_Integer,prec_Integer]:=Module[{x,pc,t,f,fp,fpp,N0=n},(*initialseedatmodestprecision*)x=N[Exp[Log[N0]/N0],prec/8/6/4];pc=Precision[x];(*precisionrampwithcubic(order-3)refinement*)While[pc<prec,pc=Min[3pc,prec];(*3xprecisioneachstep*)x=SetPrecision[x,pc];t=x^N0;(*t=x^n*)f=t-N0;(*f(x)=x^n-n*)fp=N0t/x;(*f'(x)=nx^(n-1)=nt/x*)fpp=N0(N0-1)t/x^2;(*f''(x)=n(n-1)x^(n-2)*)(*Halleyupdate:x_{k+1}=x-(2ff')/(2f'^2-ff'')*)x=x-(2ffp)/(2fp^2-ffpp);];N[x,prec]];pr=2000;steps=Ceiling[pr/1000];expM[pre_Integer,alpha_?NumericQ]:=Module[{d,bb,cc,s,n,pr2,block,start,stop,rng,xvals,ctab,m,dot},pr2=Floor[1.005pre];n=Floor[alphapr2];block=Ceiling[n/steps];Print["Iterations required: ",n];d=N[ChebyshevT[n,3],pr2+50];bb=SetPrecision[-1,pr2+50];cc=-d;s=SetPrecision[0,pr2+50];start=1;While[start≤n,stop=Min[start+block-1,n];Print["Starting block ",start," to ",stop];rng=Range[start,stop];(*RootPade6replacementforExp[Log[rng]/rng]-1*)xvals=ParallelTable[N[RootHalley3[k,pr2]-1,pr2],{k,start,stop}];ctab=Table[cc=bb-cc;m=start+j-2;bb*=2(m+n)(m-n)/((m+1)(2m+1));cc,{j,1,stop-start+1}];dot=ctab.xvals;If[Dimensions[dot]=!={},Print["ERROR: dot is not scalar."];Print["Head[dot] = ",Head[dot]];Print["Dimensions[dot] = ",Dimensions[dot]];Abort[];];s+=dot;Print[stop," iterations done."];start=stop+1;];N[-s/d,pre]];Print["Computing MRB1..."];Print["The first run took this many seconds:",AbsoluteTiming[MRB1=expM[pr,1.32]][[1]]];Print["Computing MRB2..."];Print["the second run took this many seconds:",AbsoluteTiming[MRB2=expM[pr,1.34]][[1]]];If[ValueQ[MRB1]&&ValueQ[MRB2],err=N[Abs[MRB2-MRB1],50];Print["Error estimate = ",ScientificForm[err,20]];goodDigits=If[NumericQ[err]&&err>0,Floor[-Log10[err]],"at least "<>ToString[pr]];Print["Estimated good digits = ",goodDigits],Print["MRB1 or MRB2 failed; no valid error estimate."]];Print[pr," digits are ",MRB2];
Computing MRB1...
Iterations required: 2651
Starting block 1 to 1326
1326 iterations done.
Starting block 1327 to 2651
2651 iterations done.
The first run took this many seconds:0.160933
Computing MRB2...
Iterations required: 2692
Starting block 1 to 1346
1346 iterations done.
Starting block 1347 to 2692
2692 iterations done.
the second run took this many seconds:0.18432
Error estimate = 0.×
-2000
10
Estimated good digits = at least 2000
2000" digits are "0.18785964246206...2209597744091137
WhileNSUm/AlternatingSigns(fromafreshkernal,soitdon'tcheatwithitscache)doesfairforitssimplicity.
NSum[(-1)^n(n^(1/n)-1),{n,1,Infinity},Method"AlternatingSigns",WorkingPrecision2000]//AbsoluteTiming
Out[]=
{0.465495,0.187859642462067120248517934054273230055903094900138786172004684089477231564660213703296654433107496903842345856258019061231370094759226630438929348896184120837336626081613602738126379373435283212552763962171489321702076282062171516715408412680448363541671998519768025275989389939144579835055613509648521071207844423095868129497688526949564204255586483670441042527952471060666092633974834103115781678641668915460034222258838002545539689294711421221891050983287122773080200364452153905363950553322034706275511598128280395102192649146731762935161906598160186642458249506972033819929584209355151625143993576007645932912814517090824249158832041690664093344359148067055646928067870070281150093806069381393859533606579874055620623487043293607378195646031047639506648930613606455280675151935082808373767192968663981030949496374962773830498463245634793115753002892125232918161956269736970748657654760711780171957873683009659022606687536563055165673612881502014387561366865522106743053705910397357561914890936907779832035511933624046372534941054283636997170244185516548372793588220081344809610588020306478196195969537562878348123349763858630101407272529230147233333625091858402480370404888196767676011985811167916935279685204416002708613722868894510151029199885369057286592870868754254925337943953475897035633134403826388879866561959807335147399025657781331722610761279758527227427773089857749223059709625725627188367557529788792536168767394035432145136277254922931312627643573214462161877863771542054231282234462953965329033221714798202807598422106556489004853685870708326887487737763504768916098318553628166715910841219342016438600025850842655643500695483283012054619320515593504002350835126133592174089700732978427712896736516196022507711738808426232569788546537869046222708567487474709306935732666859085616282375386551243297564746491461917957586934299620814987853666317019726453426046837801075905514867871903957831506045244419075704451138205853339846921948287947648657593178595816527492977822095977440911}