Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 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
71 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,553
1 vote
1 answer
76 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
142 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
61 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
66 views

Confusion about precision [duplicate]

When I evaluate x = 1.0000000000000000001 (* Precision of 20 digits *) Mathematica returns ...
user avatar
  • 928
-3 votes
1 answer
84 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
335 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
116 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
34 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
31 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
109 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
91 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
68 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
82 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
  • 553
2 votes
2 answers
92 views

Digits not displayed in result of simple computation [duplicate]

Matlab: ...
user avatar
  • 725
1 vote
0 answers
52 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
94 views

Exponential fit precision lost

I have a data: ...
user avatar
0 votes
0 answers
42 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
  • 3,544
1 vote
1 answer
90 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
  • 553
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
82 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
60 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
628 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
35 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
  • 339
4 votes
1 answer
65 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
1 vote
1 answer
102 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
44 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
  • 111
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
43 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
73 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,138
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,084
0 votes
1 answer
59 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
88 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
3 votes
1 answer
52 views

About Numerical Precision Related with Zeros [duplicate]

I encounted the following precision issue. I define c = a + b, but the result for 'c - a - b' does not equal zero. I am not sure how to resolve this. ''' ...
user avatar
  • 33
2 votes
2 answers
199 views

How can I make sure that there are real roots for the given function? Can I trust the plot only?

I have this function $$f(x)=(\pi -2 x)^2 \sin \left(\frac{\pi ^2}{2 x-2 \pi }+\frac{1}{2} \csc ^{-1}\left(\frac{4 \pi (\pi -x) \csc \left(\frac{\pi ^2}{x-\pi }\right)}{4 (\pi -x)^2+\pi ^2}\right)\...
user avatar
  • 463
0 votes
1 answer
35 views

Indeterminant numerical value of summation

I have the following two-fold summation. ...
user avatar
  • 1,018
0 votes
1 answer
61 views

Precision problem with mathematica

I have a precision problem with a complicated function in Mathematica. I need to get norm (NIntegrate[f[x],{x,0,1}]) and shape (...
user avatar
0 votes
1 answer
37 views

SetPrecision with Manipulate using variable number of controls

I want to convert inputs from controls in Manipulate into exact numbers and have two kinds of inputs: parameters: there are a fixed number of these rates: the number of rates is controlled by the ...
user avatar
  • 339
0 votes
0 answers
60 views

Mathematica accuracy errors when creating data

I created training data for a neural network and below are two errors I got The only code that uses "FindRoot" command is the following ...
user avatar
  • 285
0 votes
1 answer
94 views

General:munfl error problem

I have the following function, that is the result of The integration between x and some upper limit of a positive function, thus should be positive $f(x,vE) = \frac{e^{-1140.09 x} \left(e^{67945.5 \...
user avatar
1 vote
0 answers
36 views

How does WorkingPrecision in NDSolve handle MachinePrecision?

I'm wondering why the following code NDSolve[{y''[t] + y[t] == 0, y[0] == 1., y'[0] == 0}, y, {t, 0, 10}, WorkingPrecision -> 6] throws the error/warning, that ...
user avatar
  • 831
0 votes
1 answer
111 views

DiscreteMarkovProcess: preparing the transition matrix and unexpected negative results

I would like to implement a Markov process. It consists on a walk on a one-dimensional lattice, with nodes spaced $\epsilon$ from $-2$ to $2$. The transition probabilities for $x \neq y$ are as ...
user avatar

1
2 3 4 5
12