10/14/2010, 10:00 PM
(This post was last modified: 11/21/2011, 09:42 PM by sheldonison.)
Below, see the attached file, with a new version of the kneser.gp "pari-gp" code, with minor enhancements to speedup the algorithm. The default "kneser.gp" precision is now "\p 67", which supports results accurate to 32 decimal digits, or 105 binary bits. This takes about 14 or so iterations, and takes about a minute to run. This code version updates the size of the arrays as you go, so it is a lot more efficient. The size of the sexp(z) Taylor series and the Riemann mapping series is now updated to match the algorithm's increases in precision, of about 7-8 bits per iteration. Also, the number of exp/log iterations used in the super/isuper super function routine is now also increased each iteration through the loop. The program initializes the same as before.
As an example, to calculate the series for other bases, like base 10, type the following, which will execute in just under a minute. For larger bases, like base10, it actually takes more like "loop(17)" iterations to get the full 32 decimal digits of precision supported by "\p 67". The last iteration always takes extra long, since I chose to also increases the size of both series, so as to allow for more terms in the sexp(z) Taylor series result than are required simply for the next loop iteration, but this allows for a larger radius of convergence in the sexp(z) Taylor series, and is controlled by the variable "lastradius".
Much higher precision results are also made possible by this update. Type the following on the command line. In about 30 minutes or so, after 28 iterations, the result is a Taylor series for the base "e" sexp(z), accurate to 64 decimal digits or so. The Taylor series dumped to the file are printed to 64 decimal digits by default, you'll need to update the code in dumparray to get the Taylor series results with more than 64 decimal digits. I know of several further enhancements that are possible, and I've experimented with implementing some of them. I think my focus is going to shift more towards explaining convergence, and other ideas I've had.
- Sheldon
As an example, to calculate the series for other bases, like base 10, type the following, which will execute in just under a minute. For larger bases, like base10, it actually takes more like "loop(17)" iterations to get the full 32 decimal digits of precision supported by "\p 67". The last iteration always takes extra long, since I chose to also increases the size of both series, so as to allow for more terms in the sexp(z) Taylor series result than are required simply for the next loop iteration, but this allows for a larger radius of convergence in the sexp(z) Taylor series, and is controlled by the variable "lastradius".
Code:
\r kneser.gp;
init(10); loop(17); dumparray;
/* dumparray dumps the Taylor series to "kneser.txt" and output console */Much higher precision results are also made possible by this update. Type the following on the command line. In about 30 minutes or so, after 28 iterations, the result is a Taylor series for the base "e" sexp(z), accurate to 64 decimal digits or so. The Taylor series dumped to the file are printed to 64 decimal digits by default, you'll need to update the code in dumparray to get the Taylor series results with more than 64 decimal digits. I know of several further enhancements that are possible, and I've experimented with implementing some of them. I think my focus is going to shift more towards explaining convergence, and other ideas I've had.
- Sheldon
Code:
\r kneser.gp;
\p 134;
init(exp(1)); loop(28); dumparray;
