Questions tagged [precision-and-accuracy]

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

Why increasing PrecisionGoal and WorkingPrecision is deteriorating my results

I am minimizing a variable subject to many very complicated constraints, like ...
0
votes
0answers
22 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
0answers
52 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: ...
5
votes
1answer
117 views

Accurately computing $\sum_{j=2}^\infty \frac{(-x)^j}{j!} \zeta(j)$

I'm doing a sanity check of the following equation: $$\sum_{j=2}^\infty \frac{(-x)^j}{j!}\zeta(j) \approx x(\log x + 2 \gamma -1)$$ Naive comparison of the two shows a bad match but I suspect one of ...
0
votes
0answers
31 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
0answers
39 views

How do I increase an amount of digits after the point?

I have an expression such as: Log[0.784637, 517.8796]*ArcTan[-1.112673]*0.4256^(-2.034)*Sqrt[3.567] and I get 3 digits precision. I tried: ...
2
votes
1answer
43 views

N::meprec warning when setting precision

How come N[ Log[ Cos[1]^2 + Sin[1]^2 ] ] evaluates to 0. without any trouble, while ...
5
votes
1answer
181 views

Airy function zeros, conflict (error?) between Wolfram Functions vs. Mathematica

According to functions.wolfram.com, the zeros of the Airy function $\operatorname{Ai}(z)$ occur at $z_k=f\left(\tfrac{3\pi}{8}(4k-1)\right)$ for $k\in \mathbb{N}$ where $f(d)=-d^{2/3} \left(1 + \frac{...
1
vote
2answers
37 views

Compile generates non-tensor object warning for this simple function

Compile generates the following error (CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled evaluation.) upon execution of this simple ...
2
votes
1answer
93 views

NIntegrate fails to solve a double oscillatory integral

I need to compute the following integral: ...
1
vote
1answer
64 views

Removing artifact in Plot[1-(1-x)^Floor[2/x],{x,0,1/20}]

The input Plot[1-(1-x)^Floor[2/x],{x,0,1/20}] yields where the white space we see below the curve near $x=0.01$ is an artifact. How can we fix this simply? ...
1
vote
0answers
39 views
1
vote
2answers
70 views

Function decomposition to Fourier series using first impulse function

I have periodic function with certain first impulse function and period value. My task is to decompose it to approximate Fourier series (k_max = 10) using Laplace transform of first impulse function: ...
1
vote
0answers
48 views
0
votes
0answers
14 views

Setting precision of a result for the next calculation

Sorry for my easy question. I would like to learn how I could change the precision of a value to use it for the next calculation ? Lets say, a=9.96329x10^-13, in fact this value is so small and can be ...
0
votes
2answers
46 views

Confused by results of a simple computation [duplicate]

If I define f[x_] := (1 - Exp[-2 x^2])/(x Sin[x]) and then enter N[f[10^-5] - 2, 100] I get the result $$-1....
0
votes
1answer
48 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
176 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
86 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
34 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
22 views

How can I control the following behavior of Reduce?

Consider the following 3 lines of code: ...
1
vote
2answers
92 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
45 views

High Precision NIntegrate

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

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

Here I got a list ...
0
votes
2answers
58 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
87 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
124 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
47 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
98 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
38 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
87 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
93 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
81 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 ...
4
votes
3answers
143 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
64 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
256 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
35 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
75 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
271 views
1
vote
1answer
38 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
178 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
92 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
97 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
146 views
1
vote
2answers
67 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 ...

1
2 3 4 5
12