# Omnimaga

## General Discussion => Other Discussions => Math and Science => Topic started by: aeTIos on December 23, 2011, 09:09:29 am

Title: calculating the natural logarithm of an arbitrary number
Post by: aeTIos on December 23, 2011, 09:09:29 am
Hello guys,

As stated in the subject. I can't use this: (http://mathworld.wolfram.com/images/equations/MercatorSeries/Inline3.gif) since that only works for x=-1 through x=1...

Who knows another summation/computation algorithm? Thanks!
Title: Re: calculating the natural logarithm of an arbitrary number
Post by: bsl on December 23, 2011, 09:52:03 am
Hello guys,

As stated in the subject. I can't use this: (http://mathworld.wolfram.com/images/equations/MercatorSeries/Inline3.gif) 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.
Title: Re: calculating the natural logarithm of an arbitrary number
Post by: Adriweb on December 23, 2011, 12:52:44 pm
Taylor it :)

(oh, well, bsl actually wrote directly an approximation...)
Title: Re: calculating the natural logarithm of an arbitrary number
Post by: phenomist 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.)