Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie Newton Algorithm and extra precision digits

5 views
Skip to first unread message

Benjamin Collas

unread,
Apr 29, 2004, 3:31:15 AM4/29/04
to
Here is another mystery (I think there's something I dont understand
with N).

I'm using the Newton algorithm to compute one root of X^2-2 : with
NestWhile I can iterate the fixed point formula.

My stop test is (Abs[#2-#1]>10^(-6))&, and the Mathematica answer is
1.41421.
The problem is when I ask Precision[%], Mathematica returns
MachinePrecision (ie 15.9546 by default)...
More over, when I copy-past the 1.41421 answer, what displays is
1.414235623730951' which means that Mathematica knows this number with
16 digits...

But how could it be as my stop test is about 10^(-6). As Newton is a
quadratic computional method, the best I could have is a 6 or 12
precision digits.

Can anyone explains where am I wrong ?

Regards,

Benjamin Collas

PS : thank you Jens-Peer Kuska for your help,I'm so confused not to have
find it out by myself...

Jens-Peer Kuska

unread,
Apr 29, 2004, 7:47:36 PM4/29/04
to
Hi,

that what Precision[] returns is the precision of your computations
and not the error of your method.

Numerical errors have two origins, on are roundig errors
(that is reported by precision) and the second error source
are the errors of your numerical method. Mathematica can't find
out that you are using a Newton method, or that your program make
a numerical integration with a fixed step size. So Mathematica
gives you only the rounding errors.

Regards
Jens

0 new messages