Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Numerical Evaluation & Precision > Precision & Accuracy Control >

PrecisionGoal

PrecisionGoal
is an option for various numerical operations which specifies how many effective digits of precision should be sought in the final result.
  • PrecisionGoal->Infinity specifies that precision should not be used as the criterion for terminating the numerical procedure. AccuracyGoal is typically used in this case.
  • Even though you may specify PrecisionGoal->n, the results you get may sometimes have much less than n-digit precision.
  • PrecisionGoal effectively specifies the relative error allowed in a numerical procedure.
  • With PrecisionGoal->p and AccuracyGoal->a, Mathematica attempts to make the numerical error in a result of size x be less than 10^(-a)+|x| 10^(-p).
Approximate an integral to at least 10 digits of precision:
Use accuracy (absolute error) as the basis for error control in solving an ODE:
The error is small:
Without specifying the PrecisionGoal, the error is much larger:
Approximate an integral to at least 10 digits of precision:
In[1]:=
Click for copyable input
Out[1]=
 
Use accuracy (absolute error) as the basis for error control in solving an ODE:
In[1]:=
Click for copyable input
Out[1]=
The error is small:
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Without specifying the PrecisionGoal, the error is much larger:
In[4]:=
Click for copyable input
Out[4]=
Find a minimum with convergence criteria ||x_k-x^*|| <= max(10^(-8),10^(-10)||x_k||) and ▽f(x_k)<=10^(-8):
Try with convergence criteria ||x_k-x^*||<= max(10^(-18),10^(-20)||x_k||) and ▽f(x_k)<=10^(-18):
Use a higher working precision to allow convergence:
Solve a differential equation using high-precision arithmetic:
Use AccuracyGoal and PrecisionGoal at half the 32-digit working precision:
This corresponds to the automatic setting used by NDSolve:
New in 2 | Last modified in 5
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team