Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

Floating point problem with plotting huge function

I am trying to plot a complicated function. In the end the plot does not look well and it seems like there is a problem with the precision. Short explanation for the following code: First I do ...
1
vote
0answers
27 views

Problem with Set Precision [closed]

I am using Set Precision to calculate data point pairs (t,Y) in a table: Table[{t, SetPrecision[test[t], 4]}, {t, 0, 135, 7}], Works fine until I try to copy and paste the list into another list ...
-1
votes
0answers
57 views

Trying to plot a function with alot of precision [closed]

So im basically trying to plot a function of 2 variables and see when its graph is minor than 0, so the problem is this function depends on some other functions i defined and when i calculate values ...
0
votes
1answer
53 views

Precision in mathematica [closed]

I am having some trouble with mathematica, i need to precise calculations and he is rounding my numbers and taking decimal cases from them and i wanted to know if there's a way i can tell him to stop ...
1
vote
0answers
15 views

How to dynamically increase sampling rate for NIntegrate?

I am trying to numerically integrate a messy function over the range $(0,\infty)$. Rather than integrating to $\infty$, I programmed a dynamic cutoff for which I can specify a desired precision. For ...
2
votes
1answer
98 views

Question about accuracy of this improper integral calculation

I have an integral (where $q$ is a constant and $u\geq1$) $$\boxed{I = \frac{e^{(-q/4)}}{2\sqrt{2\pi}q^{\frac32}}\int_{1}^{\infty}\bigg(\frac{u-1}{u+1}\bigg)\int_{u}^{\infty}\frac{xe^{-x^2/(4q)}}{\...
1
vote
1answer
71 views

Plot Arc Length Parametrization

I want to plot the parametrization of the curve with respect to arc length. It is all known that we have to find the inverse of the arc length of the original function i.e. $F(t)$, and ...
0
votes
0answers
23 views
2
votes
0answers
39 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 ...
1
vote
0answers
45 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
2answers
80 views

How to convert a number with more decimal places to the number as it shows on the screen?

I came across a situation where many results got many decimal places. For further calculations in my situation, I would just take the value as it shows on the screen and drop further digits. For ...
1
vote
1answer
68 views

Adjusting PrecisionGoal and AccuracyGoal when solving my equation using NDSolve?

Thanks for paying attention to my question and modifying my terrible formatting[facepalm], now I think I've found the answer. The point is the selection ...
1
vote
2answers
105 views

Why does ParametricPlot does not reach the values I expect?

I have these expressions: ...
3
votes
2answers
86 views

Extracting data from InterpolatingFunction 2D surface plot

I would like to directly extract the surface plot data from the solution to a differential equation (using NDSolve). While there are many examples of this I haven't been able to find an example in 2D. ...
1
vote
1answer
118 views

How much can we trust NIntegrate when NIntegrate::eincr is shown?

I have been dealing with a high oscillation integration using NIntegrate. The warning of eincr shows that no matter how large (X)...
2
votes
1answer
36 views

Asymmetric precision warnings with Plot[]. Cannot be fixed with Rationalize[] or WorkingPrecision

Context: I isolated the following minimal working example after getting weird warnings while looking at the limiting behavior of the GumbelDistribution. Issue: If ...
4
votes
1answer
79 views

Solving a transcendental equation with FindRoot and making a contour plot

I have the following functions, ...
4
votes
0answers
120 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 ...
3
votes
1answer
58 views

About the accuracy of Method -> FiniteElement in NDSolve, version 12.0

In this question, the equation $uu'=\nu u''$, $x\in (-1,1)$, $u(-1)=1+\delta$, $u(1)=-1$, was considered. The question asked about how to solve this differential equation problem in Mathematica. There ...
14
votes
2answers
466 views

Can Mathematica provide a reliable estimate of the numerical error from NDSolve?

In the Details section of the Mathematica documentation for PrecisionGoal, one is told that Even though you may specify ...
1
vote
1answer
110 views

Simplify seems to give wrong result [closed]

I have an very long expression named "Bug", which is made by different precision numbers. When I directly apply Simplify, it seems to give me a wrong result. However when I apply SetPrecision to set ...
5
votes
3answers
367 views

How to calculate an infinite sum to 100 exact digits with NSum?

In the discussion https://math.stackexchange.com/a/3419778/198592 I stumbled of the question how to calculate the sum $$s= \sum _{n=3}^{\infty } \frac{n \cot \left(\frac{\pi }{n}\right)}{4^{n-2}}$$ ...
1
vote
1answer
57 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 ...
12
votes
4answers
176 views

How to deal with loss of significance in the case $f(x) = \sqrt{x+2} -\sqrt{x}$?

I would like to evaluate the expression $f(x) = \sqrt{x+2} -\sqrt{x}$ with cases when $x = 3.2 \times 10^{30}$ and $x= 3.2 \times 10^{16}$. I tried using ...
14
votes
4answers
407 views

Where is the numerical solving breaking down?

I am working with a set of three coupled reaction-diffusion PDEs, and for some parameter values I am getting some not so great solutions. I have been searching documentation and tutorials, and I have ...
1
vote
1answer
41 views

Logarithmic contour plot floating point precision

The following code plots the difference between two functions in a contour plot. ...
0
votes
1answer
54 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]. ...
0
votes
0answers
48 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. ...
3
votes
2answers
100 views

Table to generate colossally abundant numbers not working

I'm trying to tabulate the first 8 colossally abundant numbers defined by critical epsilon values, with epsilon listed in ...
6
votes
1answer
123 views

Stabilized Inverted Pendulum Blog Post Broken in 12.0?

One of the old Wolfram blog posts that I use frequently is this demonstration of the LQR gains computation. https://blog.wolfram.com/2011/01/19/stabilized-inverted-pendulum/ I've been able to trust ...
2
votes
1answer
155 views

Why would Evaluate[] in Plot give me warning about precision?

I have a code:- Plot[Evaluate@PDF[NormalDistribution[1.6, 0.2], x], {x, -6, 6}] And then I got the warning: ...
4
votes
3answers
437 views

How to set a tolerance level for equality constraints

Given two equality constraints: x+y==250 and z+p==65 where x=190, y=50, z=45, p=15, I want ...
1
vote
0answers
145 views

Is this the safest way of defining the global precision?

By restricting $MinPrecision = $MaxPrecision = $MaxExtraPrecision = 17 and adding extra precision to any real number ...
2
votes
1answer
154 views

Double Numerical Integral - precision is not improving answer

Consider this two-dimensional integral ...
7
votes
1answer
275 views

How to increase NDSolve accuracy for 2nd order ODE?

My attempt to NDSolve a 2nd order nonlinear ODE ...
1
vote
0answers
53 views

What does the following error message mean, in the context of NonlinearModelFit?

I am deliberately not including data or a model for this question, as I want a more general answer so that I may be able to trouble shoot this myself in the future. When performing a fit, usually a ...
2
votes
2answers
168 views

Why is Mathematica's default precision only 16 digits? [closed]

I was performing some basic computations when I noticed that NumberForm[N[Zeta[3]], {100, 100}] yields ...
0
votes
0answers
28 views

Conversion of numerics to/from database Real

I am writing data from MMA (11.0.1.0, Win 10 home 64 bit) to a Microsoft SQL Server/T-SQL database and am having considerable trouble controlling precision. The target column in the database has data ...
1
vote
1answer
47 views

Optimization of numerical integration

I would like to ask for a help from community in the numerical computation of an integral and in the preparation of a contour plot. I have already done some work in this direction, but everything is ...
1
vote
2answers
129 views

Getting error General::munfl from NonlinearModelFit [duplicate]

I am trying to fit data to a sum of Gaussians. This data is found in a file called lpeff.txt. So I write the following code: ...
0
votes
1answer
38 views

Selectively changing precision while leaving integers and rationals unchanged

I didn't find an answer to this question on the site, but as I was writing up my question, I figured out how to do it, so I thought I should post it and answer my own question so that others can ...
2
votes
2answers
95 views

Plotting with Precision

Suppose we plot Plot[ Exp[x]Exp[-x], {x,0,1000} ] This equals 1, as expected, until around x = 750 where the curve drops sharply to 0. Clearly this is due to ...
3
votes
2answers
161 views

Compute unstable integral with high precision

I want to calculate $$ \int_{\mathbb{R}^n} e^{-t_1^4-t_2^4- ...-t_n^4-(1-t_1-t_2-...-t_n)^4} \text{d}t_1 \text{d}t_2 ... \text{d}t_n $$ with the highest possible n. I tried with ...
2
votes
1answer
429 views

Why does the PoissonDistribution not plot around its mean for moderate large numbers?

I plotted the Poisson Distribution for various mean values (plot label and vertical line). The plots does not peak around the mean as the mean increase. Any advice to get the right plot, or at least ...
1
vote
0answers
76 views

NDSove vs ParametricNDSolve

ParametricNDSolve is very practical when one has to execute NDSolve again and again. However is it equally accurate? I have not ...
1
vote
2answers
167 views

NMaximize not always returning solution

This question is related to a previous question and answer here: NMinimize or NMaximize for a dynamic problem but tackles a different problem. I am trying to solve a simple linear quadratic ...
0
votes
0answers
66 views

Numerical calculation Mathematica 11.2 / 11.3 / 12 [duplicate]

Please I do not understand why Mathematica 11.2 version evaluates numerically the value below Exp[-800]//N (* 3.667874584178*10^-348 *) while 11.3 and 12 ...
1
vote
1answer
101 views

How to make these operations occur faster?

How can I get this section of the code to solve this integration faster. I have rather large values but I don't need it to be too specific. However if I lower the precision it says the integration is ...
0
votes
0answers
44 views

Need help to plot this function

...
0
votes
2answers
66 views

Precision, accuracy and very large/small exponents with Reduce

Numerical precision/accuracy question here. I am currently working on solving nonlinear equations with Reduce. Oftentimes, ...

1
2 3 4 5
10