[Numerics and precision] - A New Kind of Science: The NKS Forum

A New Kind of Science: The NKS Forum

Pages:1



Numerics and precision

(Click here to view the original thread with full colors/images)



Posted by: cele

Hi again,
I would like to ask you a general question regarding the numerical solution of a problem.

I have a system of equations (also only one) to solve numerically.
Of course there are parameters and constants that characterize the equation.
I can write these constants in different ways.
For example I can give the Planck's constant h (0.6582E-15 eV-sec) as:

0.6582*^-15 (Machine Precision)
6582*^-19 (Infinite precision)
0.6582`N*^-15 (N digits of precision)

Then I have to solve the equation (suppose I want to solve f(x)=0) and I can use the command:

NSolve[f[x] == 0, x]

and I can specify to obtain the result with N digits of precision:

NSolve[f[x]==0, x, N]

The question is: how to choose the precision of the solving-routine? And how does it correlate with the precision of the constants used.
In general, I think that the results obtained when the precision of the argument is less than the precision the routine is running with, should not be reliable. Isn't it?
Also, how to choose the precision of the constants? Which is the reliability of a constant described with 100 digits of precision?

Can you please help me in understanding better this problem?
Thank you very much in advance.
Cele



Posted by: Richard Phillips

My answer here may be wrong, and is certainly incomplete - so you should really ask an expert at MathGroup or Wolfram Research technical support, but I will try to give you a basic answer:

You ask: "how to choose the precision of the solving-routine?".

You should not have to worry about this, since if you ask for more than $MachinePrecision digits in the result (N > $MachinePrecision), the result from NSolve[f[x]==0, x, N] should be guaranteed to be correct.

Mathematica itself automatically selects a correct method to use.

For the same reason, you should not need to worry about the precision of the inputs. If they are too imprecise, and you ask for too high a precision output, Mathematica should tell you!

For inputs that have a precision less than or equal to $MachinePrecision the story is more complicated, and you need to ask an expert. I'm guessing that then the answer in general depends on a complicated way on the precision of the inputs.

I hope this helps (and is true!).





Forum Sponsored by Wolfram Research

© 2004-2009 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer
vB Easy Archive Final - Created by Xenon and modified/released by SkuZZy from the Job Openings