Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
3
votes
1answer
40 views

Rationalizing only specific terms in an expression

How can I change an expression like A = (-1. a)/(x + y) - (2.1 b)/(x + y) + 4.1 + 2. x + (3. r s)/(x + y) so that -1. a becomes ...
2
votes
1answer
45 views

Problem with the precision while plotting a figure

I am trying to plot eigenvalues of a 16x16 matrix. Below you can see the code. I get some errors like “precision may be lost”, and “Eigenvalues at some positions are expected to be the same”. As a ...
1
vote
2answers
62 views

Accuracy of Mod[x, 1] and FractionalPart[x]

The difference between exact and numerical computation is clear to me. But why is ...
7
votes
2answers
230 views

Computing separatrix orbit

I would like to numerically compute the separatrix orbit for a particle in a few potential wells, given by the negative of ...
0
votes
0answers
24 views

How to avoid machine underflow for plotting and integrating?

I am trying to integrate the following integrand, which I have plotted: ...
1
vote
1answer
68 views

Lowest Eigenvalue of a large sparse matrix without choking up the RAM (Corrected) [closed]

I am trying to find the lowest eigenvalue of a large sparse matrix of dimension N (=$3^n$, where n is number of particles in system ) using ...
2
votes
4answers
193 views
1
vote
1answer
36 views

Problem with label and precision

I need to define a function that depends on a variable taking values on discrete values, for example: ...
2
votes
1answer
145 views

(Numerical) calculation of nested integrals

The problem I'd like to (numerically) compute nested integrals of the type $$I(a;k) \equiv \left( \prod_{i=1}^k \int_0^\infty \mathrm{d}x_i \right) \exp \left( - \frac{1}{4a} \sum_{i=1}^k \left( x_i - ...
3
votes
0answers
41 views

Behavior of $MinPrecision seems to have changed between 12.0.0 and 12.1.1

I am running into a very weird bug where setting $MinPrecision to some value (in this case 200) has a very different and ...
1
vote
1answer
88 views

Exported Excel File - decimals

Im trying to export data from the interpolating function result to excel. everything works fine and the plots are as expected, but if I want to export these data to excel using ...
3
votes
2answers
92 views

Why is DistributeDefinitions taking so long with 100-300 Mb constants?

Why does DistributeDefinitions take so long to distribute variables that are 100-300 Mb in size? I am setting up ParallelTable ...
0
votes
2answers
139 views
1
vote
2answers
66 views

How to make sure that the number of PlotPoints is sufficient for giving the complete result? (How to have a plot of the whole solutions?))

I want to see the domain in which function $f$ is positive. I use this code ...
0
votes
1answer
60 views

Why is this integral throwing a “MemoryAllocationFailure” error?

The following call to NIntegrate throws the error: Throw::sysexc: Uncaught SystemException returned to top level. Can be caught with Catch[[Ellipsis], ...
5
votes
2answers
123 views

Wish to compute ln(x) with millions of digits of precision fast as possible

Computing $\ln(10)$ to 6 million digits of precision on my 2.5 GHz machine running Mathematica 12.1 takes about 23 seconds using the methods below. Wish to compute $\ln(x)$ with much higher precision....
0
votes
0answers
24 views
0
votes
1answer
40 views

$MaxPrecision doesn't work

I want to set MaxPrecision low, to like 2 decimals, but after I set it, it stays at 5 regardless. I've tried using two commands: ...
1
vote
1answer
57 views

Export high precision data to HDF5

Recently, I would like to use HDF5 instead of CSV because of times Import taking. Especially, I have to manage large data with high precision (about 50 degits) and ...
1
vote
1answer
37 views

How to improve the accuracy of the data involved in the calculation?

I want to draw the error of the two iterative methods. ...
0
votes
0answers
30 views

Improve numerical integration precision for multi-dimensional Integral

I have the following 4-dimensional integral ...
0
votes
0answers
59 views

Significant digits

I have a rather silly question, so please excuse me=) Let's say I have a general Mathematica code, where I numerically evaluate and combine several quantities. I would like to know how to determine ...
6
votes
3answers
256 views

Why do isolated large values of WorkingPrecision fail in NDSolve?

Executive Summary: Getting an accurate answer often depends on setting the WorkingPrecision high enough. Once it is high enough, though, I would expect that its ...
1
vote
2answers
60 views

How can I get a more clear result for plot of this function?

I use this command ...
1
vote
2answers
36 views

Expression evaluates to a different number when made a function

The following expression evaluates to zero at large n when just using replacement, but if the same expression is defined as a function ...
2
votes
1answer
73 views

Precision on FindRoot

I am trying to solve a non linear system of equation, and when I solve it, I have the following message FindRoot::lstol: The line search decreased the step size to ...
1
vote
4answers
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 ...
0
votes
0answers
36 views

Increase precision of ConvexHullMesh

I want to generate a set of equations for all planes in the convex hull as specified in this question. The problem is that the generated set of equations don't correctly cover all the points. I run a ...
1
vote
0answers
32 views

When do errors stop calculations? [closed]

When plotting Plot[Exp[-1/(1 - (x + 10)^2)], {x, -11, -10}], I get the following warning but the Plot follows. However, if I ...
2
votes
2answers
80 views

Precision lost on function estimation

I'm trying to plot a function such as: ...
0
votes
1answer
55 views

Is there an alternative way instead of increasing the number of plotpoints in RegionPlot to get a better result?

I have this function and I use RegionPlot to see in which part of the domain, the function is negative: ...
0
votes
0answers
39 views

Mathematica precision on extensive eigenvalues calculations

Im trying to evaluate some dot products with eigenvectors and matrices using Mathematica. My problem is the following: To an given matrix 6x6: ...
0
votes
2answers
81 views

How can I make sure that the plot of this function cross each other or not?

I have this function: $$\frac{1}{16} \left(\sinh (\pi x) \left(64 \left(x^2-4\right) \cosh \left(\frac{2 \pi x}{3}\right) \cos (y)+\left(x^2+4\right)^2+256 x \sinh \left(\frac{2 \pi x}{3}\right) \...
0
votes
2answers
104 views

Is it needed to increase the precision of ContourPlot in this case?

I have this function and I want to see where it is zero. $$\frac{1}{16} \left(\sinh (\pi x) \left(64 \left(x^2-4\right) \cosh \left(\frac{2 \pi x}{3}\right) \cos (y)+\left(x^2+4\right)^2+256 x \sinh ...
3
votes
0answers
126 views

Discrepancy between the results of NIntegrate with different methods and options

I am trying to perform a numerical integration on a function defined through a sum of exponential terms. The summation is given by: ...
1
vote
1answer
67 views

Can not get n-digits precision with N[expr, n] in WSTP

I am new to Wolfram Language and wolfram engine. I use wolfram engine development kit to increase the precision of the output from Spherical Bessel function from WSTP in c++. Part of codes that ...
4
votes
1answer
120 views

What is the most accurate way of getting the highest derivative from NDSolve?

I would like to compare my simulations in Mathematica to measured data. I measure acceleration but for simulations the starting point is displacement. How does one get accurate simulations of higher ...
2
votes
1answer
78 views

Two different results for the same differential equation while using “AccuracyGoal”, “WorkingPrecision” and “PrecisionGoal”

I saw some strange behavior as I was solving a differential equation, so I decided to plot the solution in three different conditions. First, I defined the initial conditions and some constants: ...
7
votes
2answers
322 views

Is it possible to do this two-dimensional numerical integration more precisely?

I am considering the following integral: $$J(x_1^2, x_2^2) := \frac{3 \cdot 2^{15} \pi^4}{96} x_1^2 x_2^2 \int_{-\infty}^\infty d\tau_3 \int_{-\infty}^\infty d\tau_4 \int_{-\infty}^\infty d\tau_5 \...
1
vote
2answers
119 views

Does SetPrecision[x, Infinity] expose the internal exact number in the approximated number?

What I already know (maybe) : My theory about Mathematica's way of implementing approximated number An number approX with arbitrary precision ...
1
vote
1answer
36 views

Can I configure a guaranteed precision for NIntegrate on a monotone function?

I know there are some great posts already about why PrecisionGoal->n doesn't guarantee the result of NIntegrate will actually ...
0
votes
0answers
44 views

Help with NMinimize and setting limits

Im trying to minimize the error of a function Penality that i have defined and am using the following code. ...
3
votes
1answer
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 ...
0
votes
1answer
104 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 ...
0
votes
0answers
65 views

Numerical evaluation expression not returning result in requested precision

I have a long list of descriptive statistical quantities for a univariate list of data. The problem is that the set number of significant figures is ignored by the ...
2
votes
1answer
85 views

ListLinePlot works for data similar up to 9 decimal numbers but does not work when similarity is up to 11 decimal numbers. Why?

Through the following code, Tcvalues are generated: ...
4
votes
1answer
98 views

A pattern replacement to force Mathematica to replace inexact 0 multiplication by zero

Hi Consider the following expression which contains multiplication by inexact 0 ...
2
votes
0answers
32 views

Setting the tolerance for `Equal[]` [duplicate]

I would like to control how Equal[] works and allow a certain error associated with it. I would like numerical values which are, say, within one-thousandth of one ...
2
votes
1answer
85 views

A probable misdescription of official Doc about $MachinePrecision?

According to the official documentation: When you enter an approximate real number, the Wolfram Language has to decide whether to treat it as a machine number or an arbitrary‐precision number. Unless ...
-1
votes
1answer
92 views

About the Rationalize of an approximated number

In[3]:= Clear["*"]; approPi = N[Pi]; {Rationalize[approPi], Round[approPi, 10^-15]} Out[2]= {3.14159, 3141592653589793/1000000000000000} Above ...

1
2 3 4 5
11