Skip to main content

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

234 questions
Filter by
Sorted by
Tagged with
0 votes
0 answers
65 views

### How to Determine When to Switch to Arbitrary-Precision Values?

If I execute 0.1 + 0.001 in Mathematica 11.3, I get 0.101, which is what I expect. If I execute ...
2 votes
1 answer
68 views

### Why are Packed Arrays limited to signed machine precision types?

Why are packed arrays limited to only a few types? Particularly, why are integer packed arrays limited to signed integers? And is there a way to get the same efficiency you get with packed arrays in ...
5 votes
2 answers
2k views

### Infinite expression 1/0. encountered - caused by precision?

Planck's law dependent on frequency rho is as follows: B[T_, h_, rho_, k_, c_] := (2 h rho^3)/c^2 1/(Exp[h rho/(T k)] - 1) As you can see, the denominator can ...
0 votes
0 answers
33 views

### Getting better answers by smaller working precision?

I have the following code ...
0 votes
1 answer
170 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. ...
6 votes
3 answers
834 views

### A bug with high precision

Consider the following two numbers: num1=0.0006000000000000001; num2=0.0006000000000000003; num2 appeared from ...
1 vote
0 answers
61 views

2 votes
0 answers
37 views

...
0 votes
1 answer
100 views

### Is there any alternative for conditional plot that gives a more precise result in a shorter time?

I have the given function $Func$ and want to have a plot of those domains where $-3\leq Func\leq 3$ in precise details. I am using ...
1 vote
0 answers
75 views

### How to handle "too small to represent as a normalized machine number" when plotting a figure [duplicate]

I am trying to plot a figure by the following codes: Plot[(27 2^((-2 + a)/(-1 + a)) 5^(a/(-1 + a)) 7^(1/(1 - a)) a^2)/((-1 + a) (4 + 9 a)), {a, 1.001, 3}] ...
2 votes
2 answers
258 views

### How to prevent Mathematica from rounding some PDF values to 0?

Dear Mathematica community, I'm having a problem with the PDF function for the hypoexponential distribution. Specifically, Mathematica returns 0 as soon as the value is very small. Below is an example:...
0 votes
1 answer
83 views

### How to avoid General::munfl errors?

Let's have a look at a following system of equations: ...
1 vote
1 answer
235 views

### Floating point precision and speed [closed]

I am attempting to understand how to speed up the evaluation of numerical expression. Specifically, following the first point of this blog, Mathematica is much quicker dealing with floating-point ...
9 votes
1 answer
318 views

### IntegerPart - is this a known bug?

I'm working in Mathematica 13.0 and I type a=0.00001; IntegerPart[a/a] and well, the output is 0. Try with almost any other value of ...
4 votes
2 answers
176 views

### Adding numbers with defined precision produces incorrect result

I've tracked a bug in my code down to the problem of adding two numbers together, with the left argument having machine precision, e.g by 3 . The issue is, if ...
4 votes
0 answers
177 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 ...
1 vote
0 answers
105 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 ...
3 votes
1 answer
350 views

### How to handle very numbers that are "too small to represent as a normalized machine number"?

I will preface this by saying that I am not very familiar with Mathematica whatsoever. That is why I am asking this here even though I have found a few forum posts that might provide the solution to ...
2 votes
2 answers
3k 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: ...
3 votes
1 answer
154 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 "...
4 votes
1 answer
359 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 ...
1 vote
1 answer
137 views

### Exponential fit precision lost

I have a data: ...
0 votes
0 answers
67 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 (...
1 vote
2 answers
47 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: ...
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: ...
1 vote
0 answers
52 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\$}...
0 votes
1 answer
42 views

### Indeterminant numerical value of summation

I have the following two-fold summation. ...
0 votes
0 answers
66 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 ...
1 vote
0 answers
72 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 ...
42 votes
2 answers
1k views

### Is there a difference between Divide[a,b] and a/b?

In this comment it was asserted that Divide[a,b] and a/b are different, though the documentation indicates that they are the ...
3 votes
2 answers
218 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. ...
1 vote
0 answers
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: ...
18 votes
2 answers
568 views

### Rounding problems inside InputField

The community needs to determine if this is behavior is a bug or not. – Mr.Wizard Consider the following InputField ...
0 votes
0 answers
42 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) ...
3 votes
0 answers
285 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: ...
0 votes
0 answers
54 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 <...
0 votes
0 answers
95 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: ...