User talk:JRSpriggs

From Wikipedia, the free encyclopedia

Pointers:
Category:Ordinal numbers, Category:Cardinal numbers, Category:Set theory, Category:Root-finding algorithms, Category:Proof theory, Category:Mathematical logic, Category:General relativity,

ordinal number, ordinal arithmetic, large countable ordinal, ordinal notation,

Constructible universe, implicational propositional calculus, harmonic coordinate condition,

User_talk:Oleg Alexandrov, User_talk:Jitse Niesen, User_talk:Trovatore, User_talk:Arthur Rubin, User_talk:CMummert,

Maxwell stress tensor, Wikipedia_talk:WikiProject_Mathematics, Peace of Westphalia, Wikipedia talk:WikiProject Physics, InuYasha, User talk:MathPhys/WikiProject Relativity

Resources:

http://wiki.epstone.net/werdnabot/

Archives:


[edit] Continued fractions

Hi, JRS!

I'm responding to a comment you made over here.

To DavidCBryant: You said "...well-formed continued fractions for functions like ln and sin and arctan converge a whole lot faster than the best of their series counterparts.". I would like to know more about this. I was working on the pages for Natural logarithms and Inverse trigonometric functions and I was disappointed at how slowly the series converge.

Well, I wish I could supply some specific examples, but I can't. Here's how I know about this, though.

I spent many years programming IBM mainframes in assembler language. Occasionally I had to interface an assembler routine with a FORTRAN library subroutine, to return say a natural logarithm in long floating-point form. So I acquired a copy of the FORTRAN math library logic manual from IBM. The manual didn't really belong to me; it belonged to my employer. So I don't have the book any longer. But I remember quite a bit of what it said.

The typical description of the mathematical logic underlying one of these subroutines ran something like this: We developed a continued fraction expansion for log2 x that is valid in the range aaa through bbb and determined how many terms of that fraction must be used to reduce the approximation error below 2−48 everywhere, then converted the truncated continued fraction into a rational function of x.

Come to think of it, the manuals didn't specify the coefficients of the two polynomials that entered the rational function. Those coefficients were buried in the machine language versions of the programs themselves. One other thing I remember is that they restricted the range of input values considerably. For instance, they might take the 48-bit mantissa of a floating-point number and interpret it as a fraction in the range 1 ≤ x < 2, then do a multi-precision division by √2 to further restrict the range to 1 ≤ y < √2. They'd feed y into the rational function algorithm, then adjust the result for all the powers of 2 that had been ignored up to this point. They'd switch the result from base-2 logarithms to some other base with a simple multiplication. (OK, OK. The IBM machinery was really base 16, not base 2. So they might have had as few as 45 bits of precision, and not really 48. But the concepts are right.)

I think that John Napier might have used a similar process, taking something like the 128th root of 2 (as the sqrt of the sqrt of the ...) and then calculating that logarithm ... multiplying the result by 128 gave loge 2.

Anyway, I worked through something like this once and got pretty good results using just 5th-degree polynomials in the numerator and denominator to represent ln x in a fairly limited range. I'm sorry I don't have the details handy ... I'm not very good about hanging on to stuff like that. Just in case you want to play with them, though, here are some pretty neat continued fractions for the natural log and the arctangent.

\log(1+z)=\cfrac{z}{1 + \cfrac{1^2 z}{2 + \cfrac{1^2 z}{3 + \cfrac{2^2 z}{4 + \cfrac{2^2 z}{5 + \cfrac{3^2 z}{\ddots\,}}}}}}\,

That expansion is valid in the cut complex plane, with the cut running from −1 to −∞. The partial denominators are just the natural numbers, in order, and the partial numerators (after the first one) are just n2z, where each perfect square appears exactly twice. That one probably doesn't converge too quickly for large z, because the partial numerators start getting bigger than the partial denominators too soon. But I think it works pretty well for z near zero. Another thing you might do with it is run it for +/- z, then use the (1 + z)/(1 - z) trick that's so often used with the logarithm series.

Here's another one.

\arctan(z)=\cfrac{z}{1 + \cfrac{z^2}{3 + \cfrac{4 z^2}{5 + \cfrac{9 z^2}{7 + \cfrac{16 z^2}{9 + \cfrac{25 z^2}{\ddots\,}}}}}}\,

This one is also valid in the cut plane, but this time there are two cuts, from −i to the point at infinity, going down the imaginary axis, and from i to the point at infinity, going up the same axis. It probably works well for real numbers running from -1 to 1. The partial denominators are the odd natural numbers, and the partial numerators (after the first) are just (nz)2, with each perfect square appearing once.

Oh, yeah ... both of these were developed by KF Gauss, utilizing the hypergeometric functions. Have fun! DavidCBryant 00:31, 7 December 2006 (UTC) —The preceding unsigned comment was added by DavidCBryant (talkcontribs) 00:24, 7 December 2006 (UTC).

Thanks for the information. I will try out the arctan continued fraction and compare it to the series. JRSpriggs 10:10, 7 December 2006 (UTC)
The rational polynomials from the continued fraction come closer to the true value than those from Euler's series for arctan when corresponding degrees are compared. JRSpriggs 06:44, 8 December 2006 (UTC)
I put your continued fraction for arctangent into Inverse trigonometric function. JRSpriggs 10:40, 8 December 2006 (UTC)

[edit] Your revert to InuYasha

Please try to write in a measured, nuanced, encyclopedic and factual way. Excessive and tendentious edits might disturb the work of other editors and be reverted. You might find reading WP:POV useful in this respect. Thank you. This message is in regards to your major revert to InuYasha in which you had reverted every single contribution made by editors after you. I would suggest reading WP:Civility. Power level (Dragon Ball) 15:59, 7 December 2006 (UTC)

Most of those edits were clearly vandalism. Most of the others were inadequate attempts to repair that vandalism. Your edits were the only ones I considered saving. However, you insisted on putting in a non-word, "titicular", or a very obscure word, "titular", either of which could be considered sexually suggestive when there was a perfectly good text saying the same thing already there. So I reverted you as well. JRSpriggs 06:38, 8 December 2006 (UTC)
P.S. My edit summary was "rvv to my last" ("rvv" meaning reverting vandalism). There is nothing uncivil about that. It is merely informative. JRSpriggs 06:41, 8 December 2006 (UTC)