### Author Topic: calculating the natural logarithm of an arbitrary number  (Read 2233 times)

0 Members and 1 Guest are viewing this topic.

#### aeTIos

• Nonbinary computing specialist
• LV12 Extreme Poster (Next: 5000)
• Posts: 3913
• Rating: +184/-32
##### calculating the natural logarithm of an arbitrary number
« on: December 23, 2011, 09:09:29 am »
Hello guys,

As stated in the subject. I can't use this: since that only works for x=-1 through x=1...

Who knows another summation/computation algorithm? Thanks!
I'm not a nerd but I pretend:

#### bsl

• LV4 Regular (Next: 200)
• Posts: 157
• Rating: +14/-0
##### Re: calculating the natural logarithm of an arbitrary number
« Reply #1 on: December 23, 2011, 09:52:03 am »
Hello guys,

As stated in the subject. I can't use this: since that only works for x=-1 through x=1...

Who knows another summation/computation algorithm? Thanks!
(x-1)/(x+1) +1/3 * [(x-1)/(x+1)]^3 + 1/5 * [(x-1)/(x+1)]^5 + 1/7 * [(x-1)/(x+1)]^7 .....
for x > 0
There are shortcuts on a calculator to do this.

• Editor
• LV10 31337 u53r (Next: 2000)
• Posts: 1708
• Rating: +229/-17
##### Re: calculating the natural logarithm of an arbitrary number
« Reply #2 on: December 23, 2011, 12:52:44 pm »
Taylor it

(oh, well, bsl actually wrote directly an approximation...)
« Last Edit: December 23, 2011, 12:53:13 pm by adriweb »
My calculator programs
TI-Nspire Lua programming : Tutorials  |  API Documentation

#### phenomist

• LV4 Regular (Next: 200)
• Posts: 132
• Rating: +46/-3
##### Re: calculating the natural logarithm of an arbitrary number
« Reply #3 on: January 18, 2012, 02:31:34 am »
Also, ln(x)=-ln(1/x)

If x is not between -1 and 1, take its reciprocal. (I'd also like to note that ln(negative number) is a bad idea.)
« Last Edit: January 18, 2012, 02:31:48 am by phenomist »
Level Designer for Graviter

[Disclaimer: I can't program for my life.]