**This marks about the 10th try at 7,000,000 digits. This time, I'm using a 4th degree algorithm from S.-G. Chen and P. Y. Hsieh, Fast Computation of the N th Root, Computers & Mathematics with Applications,
Vol. 17, No. 10 (1989), pp. 1423–1427 and my own algorithm for n^(1/n), which calculates six digits per iteration: Both Mathematica codes, respectively, are as follows:**
In[10]:= Needs["SubKernels`LocalKernels`"]
Block[{$mathkernel = $mathkernel <> " -threadpriority=2"},
LaunchKernels[]]
Out[11]= {"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"],
"KernelObject"[17, "local"], "KernelObject"[18, "local"],
"KernelObject"[19, "local"], "KernelObject"[20, "local"],
"KernelObject"[21, "local"], "KernelObject"[22, "local"],
"KernelObject"[23, "local"], "KernelObject"[24, "local"]}
In[24]:= Print["Start time is ", ds = DateString[], "."];
prec = 7000000;
(**Number of required decimals.*.*)ClearSystemCache[];
T0 = SessionTime[];
expM[pre_] :=
Module[{a, d, s, k, bb, c, end, iprec, xvals, x, pc, cores = 16(*=4*
number of physical cores*), tsize = 2^7, chunksize, start = 1, ll,
ctab, pr = Floor[1.005 pre]}, chunksize = cores*tsize;
n = Floor[1.32 pr];
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 = pr/2^6;
Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;
x = N[E^(Log[ll]/(ll)), iprec];
pc = iprec;
While[pc < pr, pc = Min[4 pc, pr];
x = SetPrecision[x, pc];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pc] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5,
2 pc] ll (ll - 1)/(3 ll t2 + t^3 z))];(**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) (2 ll + 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);
If[kc > 1,
Print["As of ", DateString[], " there were ", kc,
" iterations done in ", N[st, 5], " seconds. That is ",
N[kc/st, 5], " iterations/s. ", N[kc/(end*chunksize)*100, 7],
"% complete.", " It should take ", N[ti, 6], " days or ",
N[ti*24*3600, 4], "s, and finish ", DatePlus[ds, ti], "."]];
Print[];, {k, 0, end - 1}];
N[-s/d, pr]];
t2 = Timing[MRB1 = expM[prec];]; Print["Finished on ",
DateString[], ". Proccessor and actual time were ", t2[[1]], " and ",
SessionTime[] - T0, " s. respectively"];
Print["Enter MRB1 to print ",
Floor[Precision[
MRB1]], " digits. The error from a 6,500,000 or more digit
calculation that used a different method is "]; N[mtest - MRB1, 20]
with a recent output of:
As of Wed 6 May 2026 08:51:37 there were 6602752 iterations done in 8.7824*10^6 seconds. That is 0.75181 iterations/s. 71.09151% complete. It should take 142.960 days or 1.235*10^7s, and finish Tue 16 Jun 2026 15:20:00.
...and:
In[1]:= Needs["SubKernels`LocalKernels`"]
Block[{$mathkernel = $mathkernel <> " -threadpriority=2"},
LaunchKernels[]]
Out[2]= {"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"[16, "local"], "KernelObject"[17, "local"]}
In[25]:= Print["Start time is ", ds = DateString[], "."];
prec = 7000000;
(*Number of required decimals.*)
ClearSystemCache[];
T0 = SessionTime[];
(*Sixth\[Dash]order Padé kernel for n^(1/n)*)
Clear[RootPade6];
RootPade6[n_Integer, prec_Integer] :=
Module[{x, pc, z, t, N0 = n, A1, A2, A3, B1,
B2},(*initial seed at modest precision*)x = N[N0^(1/N0), prec/6^3];
pc = Precision[x];
While[pc < prec, pc = Min[6 pc, prec];
x = SetPrecision[x, pc];
(*coefficients with current working precision pc*)
A1 = SetPrecision[3 (2 N0 + 1)/(5 N0), pc];
A2 = SetPrecision[3 (N0 + 1) (2 N0 + 1)/(20 N0^2), pc];
A3 = SetPrecision[(N0 + 1) (2 N0 + 1)/(60 N0^3), pc];
B1 = SetPrecision[2 (3 N0 - 1)/(5 N0), pc];
B2 = SetPrecision[(2 N0 - 1) (3 N0 - 1)/(20 N0^2), pc];
(*residual z_i=(n-x^n)/x^n*)t = x^N0;
z = SetPrecision[(N0 - t)/t, pc];
(*6th\[Dash]order Padé update*)
x = x*(1 + A1 z + A2 z^2 + A3 z^3)/(1 + B1 z + B2 z^2);];
N[x, prec]]
expM[pre_] :=
Module[{a, d, s, k, bb, c, end, xvals, x, pc, cores = 16,
tsize = 2^7, chunksize, start = 1, ll, ctab,
pr = Floor[1.005 pre]}, chunksize = cores*tsize;
n = Floor[1.32 pr];
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 precision of around ", pr,
" decimal places."];
d = ChebyshevT[n, 3];
{b, c, s} = {SetPrecision[-1, 1.1*n], -d, 0};
Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;
(*sole kernel for ll^(1/ll) at precision pr*)
x = RootPade6[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) (2 ll + 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);
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[MRB = expM[prec];];
Print["Finished on ", DateString[], ". Processor time was ", t2[[1]],
" s."];
Print["error= ", N[mtest - MRB, 20]]; Print["Enter MRB to print ",
Floor[Precision[MRB]], " digits"];
...with a recent output of:
167936 iterations done in 2.185*10^5 seconds. Should take 139.8 days or 1.208*10^7s, finish Sun 20 Sep 2026 16:11:18.
Here is what I wrote about them and others:
