02/20/2013, 12:04 PM
(This post was last modified: 02/20/2013, 12:16 PM by sheldonison.)
(02/20/2013, 11:30 AM)Balarka Sen Wrote: ...Its just a round off error. For approximations near the real axis, the code is using a Taylor series approximation for sexp(0). Then when you type in sexp(-3), it figures out that it should use sexp(0), and then take the logarithm three times. You initialized for base(2). But, the iterative method is not an exact solution, so sexp(0) is not exactly 1, but more like 1+4.524E-63. This is just an approximation artifact of the \( \log_2(\log_2(\delta)) \), where \( \delta \)=6.527E-63. The real part is just the \( \log_2(206.6) \). The imaginary part of 4.532i is just \( \frac{\pi i}{\log(2)} \). As a side note, its interesting to calculate values for sexp in the range from -3 to -2, and note that they all have this same imaginary value. And if you graph the approximation, you can clearly see that it has a singularity as z approaches -3, with the slope getting very large.
I am using the code "kneser.gp" that I downloaded from here somewhere. It doesn't gives me any error, just returns the complex value I posted before. I typed init(2) then loop(6) and at last sexp(-3). It returns the same, ~6.73 + i*4.53
I agree with Mike, that especially for results in the complex plane, the kneser.gp code is your best bet. For larger values of imag(z), >0.85, it switches to a complex theta mapping generated from the complex fixed point schroder function, since the Taylor series at the real axis is only accurate to 32 decimal digits within a unit circle around the origin. See my recent post at http://math.stackexchange.com/questions/...-tetration for a really good short concise description, which happens to be for base(2), which you are using. Good luck with your explorations!
- Sheldon

