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

184 questions
Filter by
Sorted by
Tagged with
57 views

### Too small to represent and Chop in inaccessible algorithm

Overview I want to apply a specified Chop function to every step in an function call in Mathematica (in my case LegendreP), ...
25 views

### How to avoid machine underflow for plotting and integrating?

I am trying to integrate the following integrand, which I have plotted: ...
23 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: ...
135 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 ...
46 views

### Avoid MachinePrecision numbers in Message

Can I change the output of Message to not show MachinePrecision numbers? E.g. ...
138 views

### Can I change the default behavior so that “0.1” is interpreted as “1/10” automatically?

Consider the function f[a_] := NIntegrate[Sqrt[a + Log[x]], {x, 1, 10}, WorkingPrecision -> 30]. With this definition, I cannot call ...
38 views

### Inconsistent and oscillatory behavior with formula

I have the following code ...
77 views

### Machine-precision numbers cause loss of precision

I am trying to use the Mod function as follows. Table[ Nest[Mod[2 #, 1] &, FractionalPart[Pi], n], {n, 100}] // N ...
365 views

### How can I compute Erf of large numbers to more precision?

I would like to compute Erf[80/3] to enough precision to know the order of magnitude of 1 - Erf[80/3] How can I do that? I ...
106 views

### Why does precision decrease after increasing PrecisionGoal and WorkingPrecision on this integral?

I am trying to calculate a messy double-integral to many digits of precision. As shown below, the precision seems to increase reliably as WorkingPrecision goes from ...
105 views

### How to improve working precision?

I'm trying to fit the array data as follow: NonlinearModelFit[ data, s*t^r + (A/(w*(Pi/2)^0.5))*Exp[-2*((t - u)/w)^2], {s, r, A, w, u}, t]; But when ...
32 views

### How to get the output for the following code involving differentiation and integration?

I need to evaluate the following Mathematica code to get a numerical value as my output. But during compilation I get the error message NumericalMathFixedPrecisionEvaluate::precbd: Requested ...
64 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 ...
61 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 ...
101 views

### Equality for floats

Suppose I have two floats (e.g. {x,y} = RandomReal[{0,1},2]). Might there be a situation where all three comparisons evaluate to ...
51 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 ...
95 views

### DeleteCases with a case as float?

Might the DeleteCases have issues in matching when the list is of floats (machine precision numbers)? E.g. in this code it might fail to match correctly because ...
42 views

### Set Underflow precision in Mathematica 12 same as version 11.x [duplicate]

It seems like Mathematica version 12 sets arbitrary underflow precision depending on the function, but I would like the underflow precision to be same as what was for previous version of Mathematica ...
55 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 ...
124 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 ...
33 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 ...
346 views

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

This old trick used to work before 11.3: SetSystemOptions["CheckMachineUnderflow" -> True] But no longer... so how can we explicitly check for this in v12+?? ...
69 views

### Allow Mathematica to solve the differential equations with larger than 16 digits parameters

Consider the system of differential equations ...
61 views

### why some parts of my curve are removed or wiped

When I try to draw the next code I get a curve with missing parts, as shown in the picture. I do not know if it is an precision problem in the Mathematica program or is some data not calculated. Or is ...
68 views

### Why this very simple problem turns to “Indeterminate”?

Why the following calculation gives Indeterminate value? ...
63 views

### Preventing Mathematica from considering small values to be equal to zero [duplicate]

In my calculations I have a variable (say z) which can be an argument of Log, say, z Log[z]. ...
56 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. ...
115 views

772 views

### Truncate a number in mathematica

I want to truncate a simple number to n decimal digits. For example, 2/3. I used f[x_, n_] := N[IntegerPart[x 10^n]/10^n] but I get ...
56 views

### How to get the correct result in a simple operation in Mathematica

I have the following values for x[[i]], y[[i]] and A[[i,j]]: ...
172 views

### What's the smallest positive real allowed in mathematica?

This question may be a bit strange, but in this question, one of the answers suggests substituting some negatives values in a matrix by the smallest positive real number allowed. So, I was wondering ...