# 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
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
Accepted

### Why is Mathematica destroying this graph?

There are several important things about the way computer systems represent real numbers, which most of the time can be blithely ignored, just like the safety of bridges in the United States. One ...
• 237k
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.1k

### 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

### 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
Accepted

### How to calculate accurate answer in Mathematica?

Numerics in Mathematica can be as precise as you like. However, precision comes at price; you pay for it in computation time and in additional coding effort. In Mathematica there are several ...
• 108k

### How to detect underflow/overflow (post 11.3)?

Update I think your updated question shows exactly why the check for machine underflow was removed. In M11.1 we get: ...
• 131k

### Machine-Precision and Arbitrary Precision

This is not an answer. But I don't believe we should close this question as "easily found in the documentation". Numerics in Mathematica is an extremely complicated and mostly undocumented subject, ...
Accepted

### Why is Mathematica's default precision only 16 digits?

To give a simple answer to the question in the title: There is dedicated hardware in your CPU for machine precision computations. In contrast, arbitrary precision computations have to be emulated in ...
Accepted

### IntegerPart - is this a known bug?

[H]ow do I fix it once and for all for the entire Notebook? I suppose it depends on how you want to treat results that contain round-off error. You cannot really get rid of the problem, only shift ...
• 237k
Accepted

• 159k
Accepted

### Unexpected behavior from CoordinateBoundingBoxArray with Into[1] and 0.41

The problem arises from rounding in machine precision. For instance the second-coordinate interval {-0.41, 0.41} leads to this edge case, a one ulp error: ...
• 237k

### Numerical underflow for a scaled error function

You need to avoid the underflow or overflow inside the formula $f[x\_]$. And that can be done simply by: $$g[x\_] := \frac{2}{\sqrt{\pi}}\ \text{HermiteH}[-1, x].$$ Use this $g[x]$ in place of the ...
• 584

### Elegant high precision log1p?

LogLogPlot[{InternalLog1p[x], Log[1 + x]}, {x, 1*^-17, 1*^-14}] ps：Of course,maybe you need InternalExpm1,too.
• 26.8k
Accepted

### Why does this rounding happen at machine precision?

I think we can find out what's happening by comparing (real digits of) exact values with (real digits of) rounded machine precision values: ...
• 36.1k
Accepted

• 235k
Accepted

### New General::munfl error and loss of precision

After contacting Wolfram's Technical Support, Kyle Martin suggested the following solution (I asked permission to post his comments): One might consider overloading the functions that give you ...
• 1,982
Accepted

### Why does N not upgrade precision?

N can only lower precision, it cannot raise precision. N[1.34, 10] //Precision 4. Since ...
• 131k
Accepted

### A bug with high precision

Because default DeleteDuplicates uses === and not == (i.e ...
• 145k
Accepted

### What happens at the end of MachinePrecision? Is the remainder discarded or rounded?

It looks like it's rounded to nearest, with ties to 0, but since this rounding is done by the CPU, it might even be system dependent. On my system I get: ...
• 36.1k

### Machine precision near zero: not fulfilled?

M11.3 has changed the way machine number underflows are handled. Previously, when a function was given a machine number input and produced a result that was so small that it could not be represented ...
• 131k
Accepted

### ConvexHullMesh fails with small numbers

Skip to the last section unless you have historical interest in my digging. A quick Trace suggests a little of what may be going on. The first step in the process ...
• 272k
Accepted

### MemberQ[{0.01, 0.05}, (0.01*9*2)/9/2] returns False

Contrary to MemberQ, the function ContainsAny has an option SameTest which can be adjusted. ...

### How do I convert an inexact number smaller than \$MinMachineNumber to machine-precision?

number = 5.80373641176129118633405301544668516*^-400; number + 0. (* 0. *) N makes arbitrary precision numbers when either ...
• 13.7k