Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
9 votes
1 answer
278 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 ...
user avatar
1 vote
0 answers
32 views

Discrepancies in NDSolve Solution Between 4D and its Reduced 3D Counterpart

I have two systems, a 4D system and a 3D system. The 3D system is a reduction of the 4D system in such a way that: ...
user avatar
5 votes
1 answer
101 views

Mathematica ignores precision requirement when evaluating a Legendre function

Bug persisting through 13.1.0 [CASE:4953269] When attempting to calculate a certain associated Legendre polynomial within a given precision, Mathematica seems to ignore it if the argument is ...
user avatar
  • 1,217
0 votes
1 answer
53 views

How to improve the accuracy of integration with Bessel function without significant drop in performance?

Consider the following function and integral: ...
user avatar
  • 4,038
4 votes
2 answers
130 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 ...
user avatar
  • 557
0 votes
0 answers
31 views

What does standard deviation mean when using Predict[]?

I am using the Machine Learning function Predict[data, Method -> "DecisionTree"], and I am trying to get the most accurate measurement of its accuracy. ...
user avatar
0 votes
2 answers
172 views

Why this integral gives zero?

I would like to compute this integral for a =100, ... ,1500 $$ \int_1^\infty \dfrac{\left(x^2-1\right)^{3/2}}{x} \,e^{-ax}\, dx $$ ...
user avatar
  • 621
1 vote
0 answers
51 views

Controlling accuracy for code

So I have a lot of trouble controlling precision and or accuracy with Mathematica. I have tried reading up for it but in the end I get even more confused. Here is my code, it is a little long but it ...
user avatar
  • 635
4 votes
1 answer
239 views

NIntegrate fails to converge to desired accuracy

I am calculating an integral with Mathematica. This is the code I am using: ...
user avatar
0 votes
0 answers
22 views

Issues with ConvexOptimization and SetPrecision

I am completely new to Mathematica (second day), so do not expect things to look polished. I am trying to perform a ConvexOptimization over a List/Array (dimensionality ...
user avatar
  • 113
1 vote
2 answers
78 views

Plotting high precision high degree polynomial

When I plot a high degree polynomial such as (available as CloudObject since it is too big to explicitly include): ...
user avatar
  • 3,613
1 vote
1 answer
82 views

Divide by zero warning: Actual division by zero or spurious?

I have the following code that calculates the gain of an amplifier ...
user avatar
  • 345
2 votes
2 answers
267 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: ...
user avatar
  • 1,252
3 votes
0 answers
62 views

What's the best method to use when NIntegrating a sinx + cosx type function?

I'm having some problems when trying to NIntegrate a sinx + cosx type function. I have already tryed several combinations of ...
user avatar
0 votes
1 answer
69 views

Confusion about precision [duplicate]

When I evaluate x = 1.0000000000000000001 (* Precision of 20 digits *) Mathematica returns ...
user avatar
  • 1,032
-3 votes
1 answer
90 views

long division acurate answer on dividing long numbers [closed]

ok but first of all if i have the huge number to be divided what will i have to use for the division to be accurate long division or some other formula square root or 2 this is to calculate music ...
user avatar
4 votes
1 answer
341 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 ...
user avatar
  • 558
0 votes
0 answers
39 views

How do change precision in coefficients in matrices

I alway have this kind of matrices... obviously I would like to have 0s instead of 10^-15. I've tried with N[] function but doesn't work. Does anybody know how to proceed in this case?
user avatar
  • 199
1 vote
3 answers
117 views

Is the result given by NSolve sufficiently reliable to claim that there is such a solution for the equation?

I use this code for ContourPlot ...
user avatar
  • 463
0 votes
0 answers
35 views

How to obtain the most accurate maximum value of the given equation? Changing WorkingPrecision gives different results

I have two functions $ f(x,y) $ and $ g(x,y) $ over the domains $ 1.56 <x< 1.6$ and $3<y<\pi$. ...
user avatar
  • 463
0 votes
0 answers
32 views

Which result is more reliable in NMaximize in the given code? with `WorkingPrecision` or without it?

I have two functions $ f(x,y) $ and $ g(x,y) $ over the domains $ 1<x< 2$ and $0<y<\pi$. I use ContourPlot to ses those values of $(x,y)$ for which $g(...
user avatar
  • 463
0 votes
2 answers
113 views

How to calculate the maximum value of $x $ which satisfy the conditions $g(x,y)=0$ and $f(x,y)>1$?

I have two functions $ f(x,y) $ and $ g(x,y) $ over the domains $ 1<x< 2$ and $0<y<\pi$. I use ContourPlot to ses those values of $(x,y)$ for which $g(...
user avatar
  • 463
1 vote
2 answers
94 views

NSolve and FindRoot give a value which is not correct; how can I obtain the exact solution of the given equation? [closed]

I have two functions $ f(x,y) $ and $ g(x,y) $, I use this code ...
user avatar
  • 463
0 votes
0 answers
73 views

Crashing mathematica 12.3 with a simple ODE

I'm trying to solve an ODE using the following code: ...
user avatar
0 votes
1 answer
85 views

RegionMember command alternative that can check members exactly?

My problem is as follows: I have an exact rational polygon created using ConvexHullMesh and given a rational point I need Mathematica to decide exactly if it is ...
user avatar
  • 635
2 votes
2 answers
99 views

Digits not displayed in result of simple computation [duplicate]

Matlab: ...
user avatar
  • 725
1 vote
0 answers
54 views

Accuracy issue in computing a Markov Transition Matrix

this question is based on a previous post of mine. I am simulating a one-dimensional Markov process on a linear graph. Transition probabilities are different than zero only for nearest neighbours of ...
user avatar
1 vote
1 answer
98 views

Exponential fit precision lost

I have a data: ...
user avatar
0 votes
0 answers
45 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 (...
user avatar
  • 4,038
1 vote
1 answer
93 views

How to make Mathematica work only with 10 digits? [duplicate]

I have a quite frustrating problem. In my code, I need Mathematica to ignore everything after 10 digits. For example I need it to treat: 25.26011447795545 as ...
user avatar
  • 635
1 vote
1 answer
51 views

How to use ContourPlot and illustrate the domain of its separate lines over one axis as continuous lines on the top?

I am using this code ...
user avatar
  • 463
2 votes
0 answers
85 views

Rational numbers in NDSolve

Is it possible to use NDSolve with Rational numbers instead of Real? I use all rational ...
user avatar
  • 121
3 votes
1 answer
65 views

Which one is more accurate Solve or NSolve? How can I get the same result as Solve using NSolve in the given code?

I am using this code to calculate the quantity $sol$. Using Solve, I get the result $9.8598$ ...
user avatar
  • 463
6 votes
2 answers
674 views

How to force Mathematica to do infinite-precision calculations?

Consider the following calculation: 1234*5678*90.12 The result is: 6.31439*10^8 However, I want to get a precise result. Of ...
user avatar
  • 145
2 votes
0 answers
36 views

Precision Issue in LinearOptimization - dual solution is not feasible

Trying to solve a linear program with high precision requirements and am interested in both the primal and the dual solution. Prefer solving the primal problem for convenience and solving the dual ...
user avatar
  • 471
4 votes
1 answer
71 views

Avoid Extrapolation When Using NMaximize on Interpolating Functions

I want to use NMaximize to find the maximum value given by one interpolation function with respect to a constraint given by a second interpolation function. The main problem is that NMaximize produces ...
user avatar
1 vote
0 answers
24 views

Mathematica 12.1: Evaluation result does not show decimals [duplicate]

It surprises me that Mathematica does not show decimals after evaluating the following calculations: 500000+5.05 Result: 500005. Expecting: 500005.05 ...
user avatar
  • 493
1 vote
1 answer
109 views

Nonlinear model fit gaussian precision

I wanted to fit double gaussian but it doesn't work, it doesn't fit gaussian. The error I get: Data:data Here is code ...
user avatar
1 vote
2 answers
45 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: ...
user avatar
  • 463
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: ...
user avatar
  • 185
0 votes
1 answer
52 views

Why it remains only one digit after point in this numerical computation?

Why? And why N doesn't help? How to change and/or make it permanent?
user avatar
  • 725
2 votes
1 answer
59 views

"Sparse" Overflow error in NIntegrate

I want to evalutate an integral $$I = \int_{-0.01}^0 \int_{-0.01}^0 \left(\frac{1}{\sinh|t_2+t_1+T| \sinh|t_2+t_1|}\right)^{2/m} \left(\frac{\sinh|2t_1+t_2+T|}{\sinh|t_1+T|}\right)^{1/m} \left(\frac{\...
user avatar
0 votes
1 answer
46 views

NIntegrate::zeroregion error outside the integration domain

I am trying to integrate a function $$\int_R \frac{1}{(\sinh|T-t_1+t_2|)^{\frac2m} (\sinh|t_1-t_2|)^{\frac2m}} \left(\frac{\sinh|t_2|}{\sinh|t_1|}\right)^{\frac1m} \left(\frac{\sinh|T-2t_1+t_2|}{\sinh|...
user avatar
1 vote
1 answer
74 views

Wrong limit appears [closed]

Consider the following limit $$ \lim_{x\to-\infty}x-\sqrt{x^2+7x} $$ Going through some algebra leads to $$\begin{align} \lim_{x\to-\infty}x-\sqrt{x^2+7x}&=\lim_{x\to-\infty}\frac{(x-\sqrt{x^2+7x})...
user avatar
  • 4,358
1 vote
0 answers
46 views

Mathematica returns zero for small rational number to 1/133 power but not zero [closed]

This small number raised to the 1/133 root is not zero but Mathematica is underflowing with the computation. I assume Mathematica is first computing the quotient numerically, then taking the root: <...
user avatar
  • 1,169
0 votes
1 answer
65 views

Minimizing a quadratic form: Failed to converge to the requested accuracy or precision within 100 \ iterations

I'm trying to minimize this type of quadratic form: ...
user avatar
1 vote
0 answers
91 views

How to calculate precise higher derivatives of ParametricNDSolve solution

Higher Derivatives of NDSolve don't match the results from DSolve solution, can I somehow increase the accuracy of numerical method to match arbitrarily high derivatives? Equation I am using ...
user avatar
0 votes
1 answer
59 views

Issues with Nintegrate - different methods yielding different values (both giving warnings)

I am integrating the following function \begin{equation} \frac{1}{2d^{2}}\times\frac{\sqrt{\omega_{c}\left|t_1-t_2\right|}-\sqrt{\pi}e^{\frac{1}{\omega_{c}\left|t_1-t_2\right|}}\text{erfc}\left(\frac{...
user avatar
  • 499
0 votes
2 answers
73 views

Same integral yielding to different results

I am currently working with the following integrals \begin{equation} \int_{0}^{\infty} dk\thinspace \frac{k^{3}e^{-2kd}}{\omega^{2}+k^{4}} = \frac{1}{\omega^{2}d^{4}}\int_{0}^{\infty}d\epsilon\...
user avatar
  • 499
1 vote
0 answers
47 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$}...
user avatar
  • 499

1
2 3 4 5
12