Tue 22 May 2018
I started a 5,000,000 digits calculation
on my faster 4 core ASUS Intel Core i7 7700 Desktop computer K31CD-DS71, 32 GB ram DDR4, 2TB SATA in Windows 10 Pro using a version of my Burns-Crandall hybrid code supercharged with 4 iterations of my 4th order convergence subroutine, 4 iterations is exactly what is required to minimize the timing for 5 million digits.(4 iterations will reduce the timing of a 5 million digit computation by 1.84% from 1 iteration, so instead of a probable 120 days, it should take 118 days. Let's see...)
To further substantiate that guess, the overall timing should be approximately 1/2 * the first non "0 iteration" time estimate the program gives, [Edit 5/23/18: which is also 118 days]. (The first time estimate will be in a matter of thousands of years because of dividing by near 0 in ti = (st)/(kc + 10^-4)*(n)/(3600)/(24)
where kc is 0.)
For a comparison of recent advances, search for the message that begins with, "I think I've reached an impasse" and see that my original computed completion time for my first 4 million digit try was 106 days! That was on my six core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz with 64 GB of RAM. The 4,000,000 digit calculation on my new 8 core Zeon processor, a Intel Xeon E5-2687W v2, system, (an upgrade for the six core),is ongoing; its results are being posted in 2 replies below this one.
Print["Start time is ", ds = DateString[], "."];
prec = 5000000;
(**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 = Ceiling[pr/2304];
Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;
x = N[E^(Log[ll]/(ll)), iprec];
pc = iprec;
While[pc < pr/256, pc = Min[3 pc, pr/256];
x = SetPrecision[x, pc];
y = x^ll - ll;
x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];
(**N[Exp[Log[ll]/ll],pr/256]**)
x = SetPrecision[x, pr/64];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr/64] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5,
pr/64] ll (ll - 1) 1/(3 ll t2 + t^3 z));(**N[Exp[Log[
ll]/ll],pr/64]**)
x = SetPrecision[x, pr/16];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr/16] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5,
pr/16] ll (ll - 1) 1/(3 ll t2 + t^3 z));(**N[Exp[Log[
ll]/ll],pr/16]**)
x = SetPrecision[x, pr/4];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr/4] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5,
pr/4] ll (ll - 1) 1/(3 ll t2 + t^3 z));(**N[Exp[Log[ll]/
ll],pr/4]**)
x = SetPrecision[x, pr];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5, pr] ll (ll - 1) 1/(3 ll t2 + t^3 z));(**
N[Exp[Log[ll]/ll],pr]**)
x, {l, 0, tsize - 1}], {j, 0, cores - 1},
Method ->
"EvaluationsPerKernel" ->
32(*a power of 2 commensurate with available RAM*)]];
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 ->
"EvaluationsPerKernel" ->
16(*a power of 2 commensurate with processor strength*)];
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 (**) or enter MRBtest2 to print \
output*); 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 22 May 2018 01:02:37.
Iterations required: 6632998
Will give 3239 time estimates, each more accurate than the previous.
Will stop at 6633472 iterations to ensure precsion of around 5024999
decimal places.
0 iterations done in 3301. seconds. Should take 2.534*10^9 days or
2.189*10^14s, finish Mon 11 Nov 6939709 17:32:23.
2048 iterations done in 6503. seconds. Should take 243.8 days or
2.106*10^7s, finish Sun 20 Jan 2019 19:11:08.
4096 iterations done in 9721. seconds. Should take 182.2 days or
1.574*10^7s, finish Tue 20 Nov 2018 05:57:47.
6144 iterations done in 1.295*10^4 seconds. Should take 161.8 days or
1.398*10^7s, finish Tue 30 Oct 2018 21:15:01.
8192 iterations done in 1.623*10^4 seconds. Should take 152.1 days or
1.314*10^7s, finish Sun 21 Oct 2018 03:44:45.
10240 iterations done in 1.964*10^4 seconds. Should take 147.3 days or
1.272*10^7s, finish Tue 16 Oct 2018 07:34:30.
12288 iterations done in 2.312*10^4 seconds. Should take 144.4 days or
1.248*10^7s, finish Sat 13 Oct 2018 11:43:37.
14336 iterations done in 2.667*10^4 seconds. Should take 142.8 days or
1.234*10^7s, finish Thu 11 Oct 2018 20:49:04.
16384 iterations done in 2.998*10^4 seconds. Should take 140.5 days or
1.214*10^7s, finish Tue 9 Oct 2018 12:13:43.
18432 iterations done in 3.326*10^4 seconds. Should take 138.5 days or
1.197*10^7s, finish Sun 7 Oct 2018 13:48:39.
To get done in 118 days, the program got off on the wrong foot there. That last output ought to have read something like
18432 iterations done in 3.259*10^4 seconds....
or less.
The slowdown might have something to do with too recent of an upgrade to Widows 10 Pro without a good restart for the purpose of removing clutter!
I gave my computer a restart and am starting the program again. (If that slowdown would have been allowed to continue, no telling how badly it would affect the timing of the final result.
Nonetheless, this 5,000,000 digit run shouldn't be thought of as an attempt at a speed record; its main purpose is to check the 4 million digit calculation with a totally different method of calculating x^(1/x). I will be able to say 4,000,000 digits or more have been calculated and verified!
I have a new program to run that will check the 5 million digit run without calculating more digits. (It is just a little slower than the computation program. If anyone wants to run it, just ask!)
The following results are much more promising of a quick computation:
Start time is Tue 22 May 2018 12:12:05.
Iterations required: 6632998
Will give 3239 time estimates, each more accurate than the previous.
Will stop at 6633472 iterations to ensure precsion of around 5024999
decimal places.
0 iterations done in 3143. seconds. Should take 2.413*10^9 days or
2.085*10^14s, finish Fri 30 Jul 6609143 07:09:38.
2048 iterations done in 6312. seconds. Should take 236.6 days or
2.044*10^7s, finish Mon 14 Jan 2019 02:24:11.
4096 iterations done in 9525. seconds. Should take 178.5 days or
1.542*10^7s, finish Sat 17 Nov 2018 00:48:13.
6144 iterations done in 1.272*10^4 seconds. Should take 158.9 days or
1.373*10^7s, finish Sun 28 Oct 2018 10:48:50.
8192 iterations done in 1.592*10^4 seconds. Should take 149.2 days or
1.289*10^7s, finish Thu 18 Oct 2018 17:50:46.
10240 iterations done in 1.917*10^4 seconds. Should take 143.7 days or
1.242*10^7s, finish Sat 13 Oct 2018 05:31:09.
12288 iterations done in 2.239*10^4 seconds. Should take 139.9 days or
1.209*10^7s, finish Tue 9 Oct 2018 09:17:47.
14336 iterations done in 2.562*10^4 seconds. Should take 137.2 days or
1.185*10^7s, finish Sat 6 Oct 2018 16:59:33.
16384 iterations done in 2.885*10^4 seconds. Should take 135.2 days or
1.168*10^7s, finish Thu 4 Oct 2018 16:46:38.
18432 iterations done in 3.209*10^4 seconds. Should take 133.6 days or
1.155*10^7s, finish Wed 3 Oct 2018 03:47:19.
...
94208 iterations done in 1.543*10^5 seconds. Should take 125.7 days or
1.086*10^7s, finish Tue 25 Sep 2018 05:08:31.
96256 iterations done in 1.576*10^5 seconds. Should take 125.7 days or
1.086*10^7s, finish Tue 25 Sep 2018 05:24:27.
98304 iterations done in 1.609*10^5 seconds. Should take 125.7 days or
1.086*10^7s, finish Tue 25 Sep 2018 04:18:10.
...
194560 iterations done in 3.179*10^5 seconds. Should take 125.4 days
or 1.084*10^7s, finish Mon 24 Sep 2018 22:38:33.
196608 iterations done in 3.212*10^5 seconds. Should take 125.4 days
or 1.084*10^7s, finish Mon 24 Sep 2018 22:06:00.
198656 iterations done in 3.245*10^5 seconds. Should take 125.4 days
or 1.083*10^7s, finish Mon 24 Sep 2018 21:45:09.
200704 iterations done in 3.278*10^5 seconds. Should take 125.4 days
or 1.083*10^7s, finish Mon 24 Sep 2018 21:32:59.
...
299008 iterations done in 4.88910^5 seconds. Should take 125.5 days or 1.08510^7s, finish Tue 25 Sep 2018 00:50:29.
301056 iterations done in 4.923*10^5 seconds. Should take 125.5 days
or 1.085*10^7s, finish Tue 25 Sep 2018 00:55:32.
303104 iterations done in 4.956*10^5 seconds. Should take 125.5 days
or 1.085*10^7s, finish Tue 25 Sep 2018 00:55:45.
305152 iterations done in 4.990*10^5 seconds. Should take 125.5 days
or 1.085*10^7s, finish Tue 25 Sep 2018 01:03:55.
307200 iterations done in 5.023*10^5 seconds. Should take 125.5 days
or 1.085*10^7s, finish Tue 25 Sep 2018 01:07:30.
UPDATE
Notice the timing is slowing down! I think the processor might be throttling down.
I fined tuned my very own 4h degree convergence only code so that it is on par with the speed of Crandall's program. I'm going to get a liquid cooler for this fast 4-core -- it was running hot -- and try a different large calculation to check the 4 million digit with, (probably another 4 million using only my 4th degree convergent method).
Here are a timing table with All MRB method, Crandall's method and a hybrid of the two on this 4 core ASUS Intel Core i7 7700 Desktop computer K31CD-DS71, 32 GB ram DDR4, 2TB SATA in Windows 10 Pro:
Here are the 3 programs referenced in the above table:
All MRB:
Print["Start time is " "Start time is ", ds = DateString[], "."];
prec = 10000;
(**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.0002 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},
Method ->
"EvaluationsPerKernel" ->
16(*a power of 2 commensurate with available RAM*)]];
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 ->
"EvaluationsPerKernel" ->
16(*a power of 2 commensurate with processor strength*)];
s += ctab.(xvals - 1);
start += chunksize;
st = SessionTime[] - T0; kc = k*chunksize;
ti = (st)/(kc + 10^-10)*(n)/(3600)/(24);
If[kc > 1,
Print[kc, " iterations done in ", N[st - stt, 4], " seconds.",
" Should take ", N[ti, 4], " days or ", ti*3600*24,
"s, finish ", DatePlus[ds, ti], "."],
Print["Denominator computed in " , stt = st, "s."]];, {k, 0,
end - 1}];
N[-s/d, pr]];
t2 = Timing[MRBtest2 = expM[prec];]; Print["Finished on ",
DateString[], ". Processor and total time were ",
t2[[1]], " and ", st, " s respectively."];
(*Print[*)MRBtest2(*]*)(*Remove (**) or enter MRBtest2 to print \
output*); 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]]
Crandall
Print["Start time is ", ds = DateString[], "."];
prec = 100000;
(**Number of required decimals.*.*)ClearSystemCache[];
T0 = SessionTime[];
expM[pre_] :=
Module[{a, d, s, k, bb, c, end, iprec, xvals, x, pc, cores = 32(*=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 = 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, pc = Min[3 pc, pr];
x = SetPrecision[x, pc];
y = x^ll - ll;
x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];(**N[Exp[Log[ll]/
ll],pr]**)x, {l, 0, tsize - 1}], {j, 0, cores - 1},
Method ->
"EvaluationsPerKernel" ->
64(*a power of 2 commensurate with processor strength*)]];
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 ->
"EvaluationsPerKernel" ->
16(*a power of 2 commensurate with processor strength*)];
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, 3], " seconds.",
" Should take ", N[ti, 2], " days or ", N[ti*24*3600, 2],
"s, finish ", DatePlus[ds, ti], "."]];, {k, 0, end - 1}];
N[-s/d, pr]];
t2 = Timing[MRBtest2 = expM[prec];]; Print["Finished on ",
DateString[], ". Processor time was ",
t2[[1]], " s. Actual time was ", SessionTime[] - T0, "."];
(*Print[*)MRBtest2(*]*)(*Remove (**) or enter MRBtest2 to print \
output*); 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]]
Hybrid
Print["Start time is ", ds = DateString[], "."];
prec = 300000;
(**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 = 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[3 pc, pr/4];
x = SetPrecision[x, pc];
y = x^ll - ll;
x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];(**N[Exp[Log[ll]/
ll],pr/4]**)x = SetPrecision[x, pr];
xll = x^ll; z = (ll - xll)/xll;
t = 2 ll - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr] (ll - 1)/
t2 + (ll + 1) z/(2 ll t) -
SetPrecision[13.5, pr] ll (ll - 1) 1/(3 ll t2 + t^3 z));(**
N[Exp[Log[ll]/ll],pr]**)x, {l, 0, tsize - 1}], {j, 0,
cores - 1},
Method ->
"EvaluationsPerKernel" ->
32(*a power of 2 commensurate with available RAM*)]];
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 ->
"EvaluationsPerKernel" ->
16(*a power of 2 commensurate with processor strength*)];
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 (**) or enter MRBtest2 to print \
output*); 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]]
The 4,000,000 digit calculation on my new 8 core Zeon processor, a Intel Xeon E5-2687W v2, system, (an upgrade for the six core Intel Extreme edition),is ongoing; its results are being posted in 2 replies below this one.