Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
0
votes
1answer
45 views

The value of the function with a very small Imaginary part but can be Plotted

I have a function Y[x_,β2_], It can be plotted normally. But when I take specific values, I get something like +0.000000*I when ...
4
votes
2answers
171 views

Slider changes Pi to a MachinePrecision number

Problem Consider the following code: DynamicModule[{a = {0, Pi}, b = 4}, {Slider[Dynamic@b, {a}], Dynamic@b} ] I want a Slider...
0
votes
1answer
67 views

Accurate Numerical values of a given functional

Consider the following functional : $$ I(x,s) =\int_0^\infty\mathrm dy \frac{F(x + \mathrm iy, s) − F(x −\mathrm iy, s)}{\mathrm e^{2πy}-1}, $$ where $ F(z, s) = \dfrac{\sin^2[π\Gamma(z)/(2z)]}{z^s} $....
0
votes
0answers
33 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 ...
2
votes
1answer
20 views

How can I control the following behavior of Reduce?

Consider the following 3 lines of code: ...
1
vote
2answers
87 views

How do you overcome recursion limits when using DSolve?

I have the following program to solve for the neutron to baryon ratio during BBN. I've replaced many of the derived values with constants in order to focus on the problem: ...
0
votes
0answers
42 views

High Precision NIntegrate

Define the integrand (as a function of two variables $x$ and $y$): ...
3
votes
0answers
72 views

How can I get a number with arbitrary accuracy? [closed]

Here I got a list ...
0
votes
2answers
57 views

Precision in Integrals and NDSolve

I have a simplest code for NDSolve, the problem is I am dividing two small numbers, the denominator is so small that it gives me infinity as an answer, how can I increase the precision to get a ...
22
votes
3answers
9k views

Why am I getting that $0.999999999999988 \geq 1.0$ is True?

I am getting these results: ...
5
votes
1answer
79 views

Find the number of correct digits to compare approximation with exact value

A) For simple example suppose i want to approximate $\pi$ using $\frac{22}{7}$ and $\frac{355}{113}$. ...
1
vote
2answers
123 views

Why can't Mathematica express a minus operation between two decimal numbers with several places? [closed]

A example of the problem. This is a print from mathematica with the demonstration of the issue.
3
votes
1answer
41 views

How to set Working Precision/ Accuracy global for the entire notebook in mathematica

F1[r]=((37.3042 - r) (-25.578 + r) (62.8822 + r))/(3000 r) FindMaximum[F1[r], r] The output is {0.0345106, {r -> 31.0723}}. ...
1
vote
1answer
46 views

How to make FindRoot work with PolyLog functions

I have the following code: ...
10
votes
1answer
91 views

How to control floating point precision when `Export`ing to obj format?

Suppose we have a MeshRegion that we want to export to an obj file with, say double precision. Is that possible with Export? And ...
0
votes
2answers
36 views

How to export InputForm of a number

I need to export full form of a number i.e. the actual form with which Mathematica works. For example, full form of a number is ...
0
votes
0answers
84 views

Why can't NDSolve(Value) solve Maxwell eq. for plane wave i.c.'s when going to spherical coordinates (it works fine in Cartesian coordinates)

I would like to use NDSolveValue (or NDSOlve) to solve a set of PDEs in spherical coordinates. I started with a simplified example that resembles the problem I actually want to study, but where I know ...
2
votes
2answers
89 views

Most efficient strategy for integrating over removable poles?

I am finding many situations where I have to numerically integrate some function $f(x)$ of the form: $$f(x)=f_{s}(x)-ax^{-n},$$ where $f_s$ is a special function with a finite-order pole that is ...
2
votes
1answer
78 views

Shouldn't NIntegrate return a number whose Precision is PrecisionGoal, not WorkingPrecision?

I know that Mathematica has great built-in precision tracking, so when you do calculations with arbitrary-precision numbers, Mathematica keeps track of the precision on the result. Given this careful ...
3
votes
3answers
138 views

How to convert a real number to a string only in the original length?

Example: I have this number num = 2.9525730420542016*10^1798 (* 2.952573042054202*10^1798 *) If I want to convert it to a string, I don't get "2....
3
votes
1answer
46 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
63 views

Problem with the precision

I am trying to plot eigenvalues of a matrix. I get some errors like “precision may be lost”. As a result, there are some unwanted jumps in the plot. Any suggestion of what am I doing wrong? Thanks
1
vote
2answers
65 views

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

The difference between exact and numerical computation is clear to me. But why is ...
8
votes
2answers
244 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
31 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
72 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
219 views
1
vote
1answer
37 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
161 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
43 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
91 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
94 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
142 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
71 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
126 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
25 views
0
votes
1answer
54 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
67 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
38 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
33 views

Improve numerical integration precision for multi-dimensional Integral

I have the following 4-dimensional integral ...
0
votes
0answers
66 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 ...
7
votes
4answers
319 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
61 views

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

I use this command ...
1
vote
2answers
38 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
79 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
142 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
38 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
82 views

Precision lost on function estimation

I'm trying to plot a function such as: ...

1
2 3 4 5
11