# Tag Info

Accepted

### Why does Mathematica results differ from C++ results within machine precision?

Something important to keep in mind is that Mathematica parses x / y as Times[x, Power[y, -1]] For actual floating point ...
• 25.5k

### Is manual adjustment of AccuracyGoal and PrecisionGoal useless?

Introduction The first section below can be found in standard numerical analysis textbooks. Most current textbooks seem to assume a working environment such as MATLAB or a programming language such C,...
• 240k
Accepted

### Why am I getting that $0.999999999999988 \geq 1.0$ is True?

You can lower the value of Internal$EqualTolerance: Block[{Internal$EqualTolerance = 0}, 0.999999999999988 >= 1.0 ] <...
• 36.4k
Accepted

### What explains the inaccuracies in machine-precision 'integers' with trigonometry or powers?

The result given by python is completely wrong, as are the results given by Mathematica for machine numbers. To get a correct result, you need to use extended precision numbers: ...
• 131k

### How to deal with loss of significance in the case $f(x) = \sqrt{x+2} -\sqrt{x}$?

Your expression can be written in a more numerically stable form: Sqrt[x + 2] - Sqrt[x] == 2/(Sqrt[x + 2] + Sqrt[x]) // FullSimplify (* True *) This evaluates ...
• 16.8k
Accepted

### Why does 1 - Exp[-10.0^12] cause an out-of-memory error?

Actually this is not a duplicate. The prior question is about underflows that require massive bignums to represent at machine precision, and that much is present here as well. So what @J.M notes is ...
• 59.6k

### Why does Mathematica results differ from C++ results within machine precision?

Without code and your actual results, this question cannot be answered. Here is one thing that might help: We have a compiler that can compile to C it can show you the code it creates. So why don't ...
• 113k
Accepted

### Can Mathematica provide a reliable estimate of the numerical error from NDSolve?

We can adapt the MonitorMethod: ...
• 240k
Accepted

### Really understanding precision

Here are my thoughts: Q1 Machine numbers: For machine numbers, what you describe is correct. I would just add that you can use InputForm or FullForm to see all the digits if desired: ...
• 131k

### How to display very small numbers in Mathematica?

Can also use exact numbers. f[x_] = Cos[x] - E^(-27 x/10); f[17 10^-26]//N[#,50]& (*4.5899999999999999999999988020950000000000000000002*10^-25*) Another ...
• 8,237

### Where is the numerical solving breaking down?

Some experimentation shows that the NDSolve problem is associated exclusively with z with no feedback to ...
• 61.8k

### Keep Round-Off errors for educational purpose

You can do 5.2914/0.0034 (* 1764. *) Precision[%] (* 3.69897 *) But as you noted, the precision of the result is lower than 4 due to precision tracking. ...
• 236k
Accepted

### How are Accuracy and Precision related Mathematica for a given operation?

Precision is the principal representation of numerical error Except for numbers that are equal to zero, error in arbitrary-precision numbers is stored internally as its precision. For numbers equal ...
• 240k
Accepted

### How does Mathematica determine when to use scientific notation?

Mathematica uses 2 criteria to determine whether to show a number in scientific notation or not. For both arbitrary precision and machine precision numbers, use scientific notation if the exponent is ...
• 131k
Accepted

### How to deal with loss of significance in the case $f(x) = \sqrt{x+2} -\sqrt{x}$?

By using arbitrary precision numbers instead of machine numbers: x = 3.2`100 10^30; Sqrt[x + 2] - Sqrt[x] 5....
Accepted

### How to force Mathematica to do infinite-precision calculations?

Mathematica will perform exact arithmetic only so long as all quantities are expressed as exact numbers. 90.12 is an inexact number with machine precision (i.e. ...
• 69.1k