An old logrithm algorithm  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: An old logrithm algorithm (/thread145192.html) 
An old logrithm algorithm  Palmer O. Hanson, Jr.  12262008 While reviewing some old slide rule manuals as a part of participation in some recent threads I also looked at some old calculator manuals. I found the following material on pages 33 and 34 of the manual for the Texas Instruments SR10: Quote:For 4 <= a <= 40, the manual prescribes 1. Enter the value of a. 2. Take the square root eleven times. 3. Subtract 1. 4. Multiply by 889. The manual gives an example for the common logarithm of 12: 1. Enter 12 2. Take the square root eleven times and see 1.001214 3. Subtract 1 and see 0.001214 4. Multiply by 889 and see 1.079246 which is within 0.006% 0f the correct value of 1.079181. I haven't been able to locate a reference describing this technique. I thought that I should be able to get there with the use of infinite series but I haven't been able to push that through. Can anyone help?
Palmer
Re: An old logrithm algorithm  Thomas Klemm  12262008 Use the definition of Set n = 2^11 = 2048 and solve for x to find an approximation of LN(y): x = 2048 * (y^(1/2048)  1). Use LOG(y) = LN(y)/LN(10). Thus instead of multiplying with 2048 use 2048/LN(10) ~ 889.
Best regards Re: An old logrithm algorithm  Namir  12262008 Palmer, You post remind me of an old algorithm I cam acroos that can be used to calculate natural log and exponential (if you reverse the operations) values. e^x = (1 + x/n)^n .. where n is large enough (2048 and higher) The reverse would be: ln(x) = n*(x^(1/n)  1) where n is large enough (2048 and higher) The power 1/2048 is equivalent to taking the square root 11 times. In the late 70s, I used to approximate e^x and ln(x) with simple calculators that had the square root.
Namir Edited: 26 Dec 2008, 12:35 p.m.
Re: An old logrithm algorithm  Gerson W. Barbosa  12262008 This comes from the limit definition of ln(x):
http://kr.cs.ait.ac.th/~radok/math/mat/chap9.htm Scroll down to section 9.216 It appears n=2048 (2^11) is close enough to infinity to grant that level of accuracy in the given range. And 2048/889 (2.30371) is close enough to ln(10) (2.30258) to be used as a natural log to common log factor conversion. I hope this might explain the algorithm. Regards, Gerson.
Edited: 26 Dec 2008, 5:22 p.m.
Re: An old logrithm algorithm  Chuck  12262008 A couple of other things of interest... Graph the equation 10^(889(x^(1/2048)1))x and see what happens when the 889 is changed to either 890 or 888. Also, if you write the equation as 10^(A(x^(1/2048)1))x, and solve for A for a particular x (ie x=40) you find that A=888.6343. Fun stuff for a snowy afternoon.
CHUCK
Re: An old logrithm algorithm  Palmer O. Hanson, Jr.  12262008 Thanks to all for the prompt responses. That's what I love about this forum.
Palmer
Re: An old logrithm algorithm  PatrickS  12262008 The Texas Instruments SR10 was my firstever calculator. My dad purchased it for me somewhere around 197475 for about $100 (Canadian). Of course, I read the manual covertocover and vividly remember reading about this nifty logarithm technique. I actually put it to use on several occasions, mostly in chem lab. While knowing this trick was like a secretdecoder ring in it's novelty, I was nevertheless jealous of my more affluent friends whose dad's bought them the incredible SR52 ($250) with it's one key log / trig capabilities. <Sigh> But that SR10 was still waaayyy better than the onetotwo digit accuracy I was getting previously with my (metal) Stirling slide rule. Of course, even then I knew of the superiority of HP calculators, but the price tags of the thencurrent models (HP45, 55 and 65) were far out of reach.
It was only a year or so later that I was introduced to the techniques of calculus and learned how and why this multisquare root trick worked.
Re: An old logrithm algorithm  Namir  12272008 Palmer, You are so welcome. I enjoy sharing algorithms, because I can then implement them on a whole variety of machines and languages. I remember 30 years ago I can across the definition of the e^x using the limits. I used to chat with different engineers (mostly with simple calculators that had the square root) and showed them how to approximate ln(x) and exp(x). That seem to impress them.
Namir
Re: An old logrithm algorithm  Namir  12282008 As the equations in my post, and those of other folks, show, the number 2048 (2 to the power of 11) used to calculate the exponential or logarithm can be replaced by even higher powers of 2. I checked the errors and found that the error has the following form: error = A e(B N) (for 5 <= N <= 16)
Where N is the power of 2 used, and A and B are constants that depend on the argument for exp(x) or for ln(x). Edited: 28 Dec 2008, 10:34 a.m.
