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.

Filter by
Sorted by
Tagged with
2 votes
2 answers
142 views

Error "is too small to represent as a normalized machine number; precision \ may be lost " for small values in Plot

I'm trying to plot two curves but I'm having issues with the lower end of the range: ...
user avatar
  • 1,252
0 votes
1 answer
70 views

Spurious poles in a gain plot (due to machine precision or complex numbers?)

I have the following plot that I like to make. It details the gain of an amplifier. ...
user avatar
  • 345
4 votes
1 answer
335 views

Real number equality (==) not working: what's the least-overcomplicated solution?

I'm running a program that evaluates equalities after I substitute all symbols for numbers. The equalities on floats are giving me trouble. My program is reaching a point where something like the ...
user avatar
  • 558
3 votes
1 answer
120 views

FixedPoint not working, despite quick convergence of sequence [closed]

Trying the computation below, with Mathematica 13.0.0, I am not getting a result returned. FixedPoint[Cos, 0.85] This appears in the 3rd edition of "...
user avatar
  • 315
1 vote
1 answer
94 views

Exponential fit precision lost

I have a data: ...
user avatar
0 votes
0 answers
42 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 (...
user avatar
  • 3,542
1 vote
2 answers
44 views

`KernelMixtureDistribution` error message about precision

I want to use KernelMixtureDistribution to deal with a large amount of data points. For example, the following codes shows how I use it: ...
user avatar
  • 463
0 votes
0 answers
42 views

Why is the `N` function giving me the wrong result when using WolframScript? [duplicate]

I am using wolframscript.exe to learn mathematica and I would expect the following code to return 0.7071: ...
user avatar
  • 111
1 vote
0 answers
47 views

plot and limit are not in agreement [closed]

I am plotting the following function $\frac{\sqrt{t \text{$\omega_c $}}-\sqrt{\pi } e^{\frac{1}{t \text{$\omega_c $}}} \text{erfc}\left(\frac{1}{\sqrt{t \text{$\omega_c$}}}\right)}{(t \text{$\omega_c$}...
user avatar
  • 499
0 votes
1 answer
35 views

Indeterminant numerical value of summation

I have the following two-fold summation. ...
user avatar
  • 1,018
0 votes
0 answers
60 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 ...
user avatar
  • 285
0 votes
1 answer
94 views

General:munfl error problem

I have the following function, that is the result of The integration between x and some upper limit of a positive function, thus should be positive $f(x,vE) = \frac{e^{-1140.09 x} \left(e^{67945.5 \...
user avatar
1 vote
0 answers
36 views

How does WorkingPrecision in NDSolve handle MachinePrecision?

I'm wondering why the following code NDSolve[{y''[t] + y[t] == 0, y[0] == 1., y'[0] == 0}, y, {t, 0, 10}, WorkingPrecision -> 6] throws the error/warning, that ...
user avatar
  • 831
1 vote
0 answers
41 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: ...
user avatar
  • 61
3 votes
2 answers
151 views

Simplify for precision

I have an a set of equations to solve — details irrelevant — the result of which will be converted into PostScript, a 1980s printer-control language the only floating precision of which is single. ...
user avatar
  • 499
0 votes
0 answers
32 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) ...
user avatar
3 votes
0 answers
78 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: ...
user avatar
0 votes
0 answers
43 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 <...
user avatar
  • 143
0 votes
0 answers
80 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: ...
user avatar
  • 21
1 vote
0 answers
43 views

Are pixels machine numbers? [closed]

Mathematica allows one to work with the information that is behind a photo. For example, the command ImageData generates a list containing the “pixels” (which will it be a number from $0$ to $1$ if no ...
user avatar
  • 141
0 votes
0 answers
67 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 ...
user avatar
1 vote
2 answers
70 views

How to increase the value of MinMachineNumber to avoid overflow error?

I have a complicated function called f2[re] ...
user avatar
  • 1,047
0 votes
0 answers
45 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 ...
user avatar
2 votes
0 answers
72 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 ...
user avatar
3 votes
1 answer
80 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), ...
user avatar
  • 33
0 votes
0 answers
25 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: ...
user avatar
1 vote
0 answers
774 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 ...
user avatar
3 votes
1 answer
53 views

Avoid MachinePrecision numbers in Message

Can I change the output of Message to not show MachinePrecision numbers? E.g. ...
user avatar
  • 17.6k
1 vote
4 answers
177 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 ...
user avatar
  • 699
1 vote
1 answer
97 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 ...
user avatar
  • 163
3 votes
3 answers
535 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 ...
user avatar
  • 447
3 votes
1 answer
117 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 ...
user avatar
  • 699
0 votes
1 answer
159 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 ...
user avatar
1 vote
1 answer
53 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 NumericalMath`FixedPrecisionEvaluate::precbd: Requested ...
user avatar
  • 183
0 votes
0 answers
70 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 ...
user avatar
0 votes
0 answers
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 ...
user avatar
  • 379
0 votes
0 answers
196 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 ...
user avatar
5 votes
1 answer
151 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 ...
user avatar
  • 1,548
1 vote
0 answers
57 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[0] == \[Pi], y'[0] == 0 }, y, {x, 0, 120}] The equation and the ...
user avatar
3 votes
1 answer
111 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 ...
user avatar
  • 1,548
2 votes
0 answers
53 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 ...
user avatar
1 vote
0 answers
65 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 ...
user avatar
4 votes
0 answers
127 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 ...
user avatar
1 vote
0 answers
39 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 ...
user avatar
9 votes
2 answers
404 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+?? ...
user avatar
  • 30.3k
0 votes
1 answer
86 views

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

Consider the system of differential equations ...
user avatar
  • 3,542
1 vote
1 answer
62 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 ...
user avatar
  • 629
0 votes
1 answer
78 views

Why this very simple problem turns to "Indeterminate"?

Why the following calculation gives Indeterminate value? ...
user avatar
  • 629
0 votes
1 answer
92 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]. ...
user avatar
  • 629
0 votes
0 answers
66 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. ...
user avatar

1
2 3 4 5