A New Kind of Science: The NKS Forum > Pure NKS > Numerics and precision
Author
 Thread
cele

Registered: Sep 2004
Posts: 2

Numerics and precision

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

__________________
Cele

Report this post to a moderator | IP: Logged

09-28-2004 04:47 PM
Richard Phillips
Wolfram Science Group
Boston, USA

Registered: Oct 2003
Posts: 46

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!).

Report this post to a moderator | IP: Logged

10-01-2004 07:38 PM

wolframscience.com  |  wolfram atlas  |  NKS online  |  web resources  |  contact us

Forum Sponsored by Wolfram Research

© 2004-13 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer | Archives