Numerical Log Help

Thread Starter

amilton542

Joined Nov 13, 2010
497
Hi,

I want to calculate logs numerically like Newton has done in this video:


You need to skip to exactly 15 minutes 55 seconds and pause to see the diagram.

The only time I deal with logs is when they're functions in the calculus. But I want to gain a bit more of a numerical understanding by calculating them like he's done, but I don't know what he's done to do this.
 

WBahn

Joined Mar 31, 2012
30,058
There are lots of ways to compute logarithms and there may or may not be enough clues in that excerpt from his work to figure out how he was doing it there.

If you do some Googling for something like "calculating logarithms by hand" or "the history of logarithms" you can probably find the techniques that were used at various points in history to compute logarithms.
 

Papabravo

Joined Feb 24, 2006
21,225
There is the Taylor Series, and I suspect that other series can be adapted (truncated) to this effort. Maybe, like John von Neumann, he did the numerical integration of (1/x)dx in his head
 
Last edited:

WBahn

Joined Mar 31, 2012
30,058
I doubt either of them -- or anyone -- has done numerical integration in their head to fifty sig figs.
 

Papabravo

Joined Feb 24, 2006
21,225
Uh, yeah -- did you actually view the video segment the TS linked to?
Uh...no. I just remember that in the era before computers morphed from people to machines, four significant figures was more than adequate. I'm pretty sure the apocryphal JvN stories never claimed such a prodigious number of significant figures in the ballpark of fifty.
 

WBahn

Joined Mar 31, 2012
30,058
Uh...no. I just remember that in the era before computers morphed from people to machines, four significant figures was more than adequate. I'm pretty sure the apocryphal JvN stories never claimed such a prodigious number of significant figures in the ballpark of fifty.
JvN? Oh, John von Neumann. I haven't heard those claims before, so I don't know.

But the TS here specifically stated that he wanted to calculate logs the same way that Newton did as indicated at a specific time hack in a specific program that specifically claimed that Newton computed logarithms to fifty decimal places not because he had any need for it, but merely because he wanted to do it. So I doubt that the method used by Newton for that involved numeric integration in his head.
 

Papabravo

Joined Feb 24, 2006
21,225
JvN? Oh, John von Neumann. I haven't heard those claims before, so I don't know.

But the TS here specifically stated that he wanted to calculate logs the same way that Newton did as indicated at a specific time hack in a specific program that specifically claimed that Newton computed logarithms to fifty decimal places not because he had any need for it, but merely because he wanted to do it. So I doubt that the method used by Newton for that involved numeric integration in his head.
OK, but as any human computer will tell you calculations to that many places are unlikely to be error free.
 

WBahn

Joined Mar 31, 2012
30,058
OK, but as any human computer will tell you calculations to that many places are unlikely to be error free.
I absolutely agree. There are algorithms that can minimize the potential for error, but I would be surprised if any of Newton's (or anyone else's) attempts to compute anything to that level were actually successful.

Creating log and trig (and other) tables were a major undertaking for some time during that period and errors were always being found in tables as others sought to extend them.
 

The Electrician

Joined Oct 9, 2007
2,970
Hi,

I want to calculate logs numerically like Newton has done in this video:

You need to skip to exactly 15 minutes 55 seconds and pause to see the diagram.

The only time I deal with logs is when they're functions in the calculus. But I want to gain a bit more of a numerical understanding by calculating them like he's done, but I don't know what he's done to do this.
Newton.png
 

WBahn

Joined Mar 31, 2012
30,058
How many terms did Mathematica have to evaluate to get that result?

As a quick estimate, I would say that it would be when [(1/10)^n]/n < (1/10)^50 (though it will actually be further than that since the series is converging from one side). So that's going to be about 50 terms.

It was probably carried out exploiting the following concept

x + x^3 + x^5 + x^7 = x(1 + x^2(1 + x^2(1 + x^2)))
 

The Electrician

Joined Oct 9, 2007
2,970
How many terms did Mathematica have to evaluate to get that result?

As a quick estimate, I would say that it would be when [(1/10)^n]/n < (1/10)^50 (though it will actually be further than that since the series is converging from one side). So that's going to be about 50 terms.

It was probably carried out exploiting the following concept

x + x^3 + x^5 + x^7 = x(1 + x^2(1 + x^2(1 + x^2)))
The folks at Wolfram don't say how their built-in functions like ArcTanh get their result, but they probably don't use the series Newton used; I have no doubt that there are much faster converging series for ArcTanh.
 

The Electrician

Joined Oct 9, 2007
2,970
It looks like 23 terms of the series just barely fails to give 50 digits; 24 does it:

Newton1.png

The built-in function is more than 100 times faster at calculating 10000 digits of ArcTanh:

Newton2.png
 

WBahn

Joined Mar 31, 2012
30,058
Ah, my bad. I was figuring my estimate based on the exponent n and forgot that there are only n/2 terms. So my estimate should have been about 25.
 

MrAl

Joined Jun 17, 2014
11,480
Hi,

Here's another summation kernel (limits running from 0 to n NOT 1 to n):
x^(2*k)/(2*k+1)

but then after the summation the result gets multiplied by x. Slightly faster convergence, but not much :)

Yeah looking at the nth term times x should give some idea of the error:
x^(2*n+1)/(2*n+1)

and of course as with many of these formulas the convergence gets MUCH slower the closer x is to 1.
There are ways to calculate the error term but i'd have to look it up.
 
Top