# Questions tagged [machine-precision]

For questions on the use of machine-precision real numbers (also known as floats), the numbers that can be directly manipulated through the underlying numerical capabilities of your computer system.

38 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
97 views

### Small positive machine number calculation in Mathematica 11.3

In Mathematica version < 11.3, any positive Machine‐Precision Numbers exceeding the range [$MinMachineNumber,$MaxMachineNumber...
130 views

### How does Mathematica evaluate N[π, 30] == π?

I want to know how N[π, 30] == π works. The result is True. I wonder whether the exact number ...
176 views

### Is it possible to get the original number from DecimalForm?

Bug introduced in 5.2 or earlier and persisting through 13.1.0 [CASE:4315787] Wrong behavior of NumberForm (DecimalForm outputs ...
244 views

### Classification problem using SVM methods

I am running SVM on mathematica and I a used this code with classes: ...
259 views

### How to deal with too small numbers

When dealing with a code that produces too small numbers (in a complicated way) like 0.33691 4.015757066049965*10^-330 I get the following warning General::munfl: ...
2k views

### Set Global Maximum Precision

I'm sure this has been asked before, but I've looked around and can't figure it out: How do I set a global maximum precision for a notebook (or in general, globally)? I have a large notebook in ...
33 views

...
116 views

### Generalizing technique to handle General::munfl error?

In contrast to earlier versions of Mathematica, in versions 11.3 and later Mathematica no longer switches to arbitrary precision when it detects a MachineNumber underflow. While this behavior is ...
1k views

### General:: Exp[-717.401] is too small to represent as a normalized machine number; precision may be lost

I am solving pde. For the post processing bvp, there is solution given in output which is the solution from mathematica version 10.0.1. Output from above in mathematica 10.0.1 is, But when the similar ...
301 views

### Printing Precision of Machine Numbers

Is Mathematica making the print precision rounding judgment more stringent based on whether or not the number is above or below the rounding target? If so, why? In my real case, I have many numbers ...
161 views

### Enforcing WorkingPrecision in NIntegrate

I have a very complicated 2D integral that I need to calculate repeatedly, and I'm trying to speed it up a bit, since at the moment it's taking a couple of days to complete. One thing I've noticed is ...
1 vote
71 views

### Issue with some floating-point errors and not others

Not looking for a solution necessarily, but just trying to understand why this issue occurrs. I have a 'Do' loop which iterates some algorithm over values of a parameter 'x' with range {x,0,1,0.1} and ...
1 vote
65 views

### How does WorkingPrecision in NDSolve handle MachinePrecision?

I'm wondering why the following code NDSolve[{y''[t] + y[t] == 0, y == 1., y' == 0}, y, {t, 0, 10}, WorkingPrecision -> 6] throws the error/warning, that ...
1 vote
43 views

### ContourPlot3D with small domain produces glitchy mess

I'm able to plot some graphs over small domains, but not others. For example, this works just fine: ...
1 vote
74 views

### Numerical precision - simulating an unstable equilibrium

I was playing around with NDSolve and the following ODE s = NDSolve[{y''[x] == -Sin[y[x]], y == \[Pi], y' == 0 }, y, {x, 0, 120}] The equation and the ...
1 vote
68 views

### FindRoot giving error in Mathematica version 12

I was using the same code in previous version of Mathematica but unfortunately I had to update Mathematica to version 12 because I upgraded MacOS to Catalina. Now when I run my code, I get this error ...
1 vote
59 views

### Changing machine precision notebook-wide leads to peculiarities

For a project of mine it is preferrable to set notebook precision globally. I have done so by using the answer in Global precision setting. The idea is to dynamically create a ...
1 vote
205 views

### Machine Learning Predict Precision

I have this code p = Predict[{1 -> 123456789123456789, 3 -> 987654321987654321}] values are big, more than 15 digits (standard machine precision). when I ...
1 vote
293 views

### Treating a bad conditioned covariance matrix

I am trying to detect outliers in a big dataset using the Mahalanobys distance method. To calculate the Mahalanobys distance for a given vector $x$ from a mean vector $\mu$ you have to compute the ...
1 vote
65 views

### Which operations preserve digit precision?

Imagine I had to use numbers with a 600 precision digits. Do all mathematical operations, like +,-,...
85 views

### How to set the precision for the entire notebook

I want to do various computations conditional on a given precision for the entire notebook. I use the following code: ...
54 views

### Overflow + Underflow Problems with Code

I am trying to use Mathematica to verify simulation results with an analytic result. The analytic results are performance measures of the M/D/1 queue, which unfortunately uses the factorial function ...
59 views

### How to set up precision by default?

I have a table computing many numbers with large precision. Because of this, probably, Mathematica consumes a lot of RAM. Is it possible to restrict the precision in any calculations by default (...
63 views

### Mathematica accuracy errors when creating data

I created training data for a neural network and below are two errors I got The only code that uses "FindRoot" command is the following ...
41 views

### General::munfl - Precision lost in LinearModelFit

I am new to mathematica so I am confused regarding the loss of precision in LinearModelFit. In building a linear model with uora (1 or 2) and encodeSeverity (1,2 or 3) ...
52 views

### Solving a determinant to get non-zero roots in a heat transfer problem

I am trying to solve a mathematical model of a heat transfer problem. As an intermediate step there is a characteristic equation in the form of a determinant, which needs to be solved for variable <...
92 views

### How to change Machine Precision digits to meet the tolerances

I am trying to solve for Tcm and Mag by solving nonlinear equations using FindRoot command using following code: ...
71 views

### Problem with the Rank of a matrix after a FindRoot

I am solving a boundary problem defined by a set of four-component vectorial functions. Without going into many details, I have two functions on the left and two on the right of an interface. The ...
101 views

### How to copy and paste numbers with "" mark and use them in calculations, without using N or setting precision every time

Suppose we have run a calculation and get a number like 2.758952615889003 If we then copy-paste this number and do a calculation like ...
28 views

### Different sensitivies from LinearSolve and Eigenvalues. How to conciliate them?

I use the following functions to receive a matrix, and make it symmetric positive definite: ...
95 views

### Understanding Working Precision - two example equations

I am trying to understand how WorkingPrecision works, and in general how very small/large numbers are to be handled. Let me preface I probably do not have ...
20 views

### Conflicting output provided by N[...]

I am trying to evaluate an expression : (-((I (k2 - k1) (-1 + E^(2 I (k2 - k1) \[Pi])))/(-1 + (k2 - k1)^2))) /. {k1 -> 2, k2 -> 7} This gives ...
353 views

### Dealing with General::munfl errors

Edit: So, while trying to figure out a minimal exmaple, I found out that my main problem was actually unrelated to this and it just happened to be that giant pile of warnings and error messages coming ...
72 views

### How to resolve underflow occurrences?

I am solving a second order differential equation described by odey below. For the asymptotics, I have the following code which will be used as initial conditions for NDSolve. ...
332 views

### Plot a function with very small values, close to zero

I want to plot a function with very small values, close to zero, but even though the limit is -3/2 as x->0, I can't get any ...
104 views

### Getting max precision limit overflow for a very simple calculation

I've never seen this error on such a simple calculation. Does anybody know how to fix this annoying error? A comparison of float calculation and exact expression for NumberForm[0.3^2 - (3/10)^2, 18] gives an exact zero for $0.3$. However, ...