Questions dealing with the relative uncertainty in the values computed, stored, or manipulated by Mathematica.

learn more… | top users | synonyms

51
votes
2answers
2k views

When I can assume that all decimal digits returned by Mathematica are provably correct?

How to Control the Precision and Accuracy of Numerical Results Arbitrary-Precision Numbers Mathematica works with exact numbers and with two different types of approximate numbers: ...
17
votes
0answers
232 views

Is MathieuC for moderately large imaginary arguments broken?

I'm trying to plot MathieuC[-3,0.3,I x] for $x\in[0,10]$, and here's what I get even with arbitrary precision arithmetic (here I use ...
14
votes
2answers
456 views

Why do NumberForm and Round apparently use different tie-breaking methods?

When rounding numbers (for example, rounding a real number to the nearest integer), the "round to nearest" rule is usually used. For example, 1.4 is rounded down to 1 and 1.6 is rounded up to 2. ...
13
votes
2answers
533 views

more numerically accurate inverse matrix

I encountered the following matrix mat = {{2, 2.161209223472559` + 1.682941969615793` I}, {2.161209223472559` - 1.682941969615793` I, 2}} and ...
13
votes
1answer
170 views

Is there a way to get BSplineFunction beyond MachinePrecision?

I have been using BSplineFunction (Mathematica 8) to generate a smooth representation of some data, which I might then do some further processing on. As I ...
12
votes
1answer
260 views

How to add AccuracyGoal and PrecisionGoal options in a numerical function?

There are many built-in functions that contain AccuracyGoal, PrecisionGoal and ...
11
votes
1answer
115 views

Abnormal behavior of RealDigits[x]

In the Details of the document of RealDigits writes the following line: RealDigits[x] normally returns a list of digits of ...
9
votes
1answer
379 views

Confused by (apparent) inconsistent precision

$$ e^{\pi \sqrt{163}} \approx 262537412640768743.99999999999925 $$ E^(Pi Sqrt[163.0]) N[E^(Pi Sqrt[163.0]), 35] NumberForm[E^(Pi Sqrt[163.]), 35] returns ...
8
votes
3answers
1k views

Replace very small numbers by zero in the output of a list

I have a long nested list, but many elements are numbers of order 10^-18 or less, e.g. ...
8
votes
2answers
741 views

Finding differences between Pi with varying number of decimals

I have the following code In[32]:= N[Pi, 2] Out[32]= 3.1 In[33]:= N[Pi, 1] Out[33]= 3. In[34]:= N[Pi, 2] - N[Pi, 1] Out[34]= 0.*10^-1 Why can't Mathematica ...
8
votes
2answers
244 views

Error computing sum of sum of digits

I've defined a function that computes the sum of the base-b digits of n: DigitSum[n_, b_] := Total[IntegerDigits[n, b]] Then I defined a function that computes ...
8
votes
1answer
211 views

Numerical Integration different in Mathematica version 9 and 10 with same options

I have noted that the same function with the same settings gives me different results in Mathematica version 9 and 10. This involves integrating numerically interpolating functions and so on. Here a ...
7
votes
3answers
3k views

Strategies to solve an oscillatory integrand only known numerically

I have an integrand that looks like this: the details of computation are complicated but I only know the integrand numerically (I use NDSolve to solve second ...
7
votes
2answers
239 views

Why does N[Re@f] give complex result?

Consider this code: ...
7
votes
2answers
170 views

Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
7
votes
2answers
255 views

NIntegrate fails to converge under almost any PrecisionGoal, MinRecursion etc. How can I trust the result?

I have been getting some ideas by reading other related questions in the forum, but the integral I have to do is not converging in many cases. The integrand is of the form: ...
7
votes
1answer
2k views

How to set the working precision globally? $MinPrecision does not work

I want to increase the precision globally to 50 at least, but $MinPrecision does not work. ...
7
votes
1answer
81 views

Change system options in package

I use Mathematica mostly for numerical calculations, and sometimes the performance of numerical calculations can be greatly improved if the high-precision arithmetic can be switched off by ...
6
votes
3answers
311 views
6
votes
2answers
495 views

A problem about fixed point iteration theory

Description Recently, I have been learning a couse called "Numerical Analysis". The fixed point iteration theory was introducted to solve the ...
6
votes
2answers
164 views

Large Number times Tiny Number

A (maybe noob) question: Let a = 1234567891234567889998.5 b = 1234567891234567889999.5 Mathematica (v8) yields for ...
6
votes
2answers
2k views

How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
6
votes
1answer
121 views

Issues with $MachineEpsilon

I'm attempting to add $MachineEpsilon to numbers I am pulling from the domains of 3 interpolating functions. I pulled 3 numbers, and for one of these numbers adding ...
6
votes
2answers
332 views

Cannot Get Numerical Results to Match

I try this numerical summation (in two parts) ...
6
votes
1answer
213 views

Numerical error in Mathieu functions

Consider the MathieuCharacteristicA function, which is a piecewise function according to the documentation. The discontinuity happens at integer number. ...
6
votes
1answer
150 views

Bug in ListPlot?

I want to check if this is a bug before I email WR about it. I can't get ListPlot[] to make scatter plots over a very small area: ...
6
votes
0answers
129 views

Why has Version 10.3 precision reduced?

In version 7.0.1.0 and versions 10.0 and 10.1 the following is produced: ...
5
votes
6answers
2k views

Why is this Mandelbrot set's implementation infeasible: takes a massive amount of time to do?

The Mandelbrot set is defined by complex numbers such as $z=z^2+c$ where $z_0=0$ for the initial point and $c\in\mathbb C$. The numbers grow very fast in the iteration. ...
5
votes
3answers
302 views

Increasing the precision of a calculation

Clearly I have misunderstood how to do this: I seem unable to understand how to get more digits out of a calculation and I can't see why - the following piece of code illustrates the issue. ...
5
votes
1answer
123 views

Is the divergence between Round and setting an explicit precision intentional or a bug?

Introductory remark: I take it (from Mathematica's online documentation), that Precision is effectively the number of significant digits, as seen by the system. ...
5
votes
1answer
80 views

Can Someone Please Explain Internal`$SameQTolerance?

If I input Internal`$SameQTolerance (* output = 0.30103 *) which is the approximation of Log[10,2], or ...
5
votes
1answer
158 views

Is it possible to change the precision in Compile?

I'm using Compile to do some numerical calculation and I need high Precision. I was wondering if it is possible to change the ...
5
votes
1answer
746 views

ReadList can't read from file containing high-precision Reals

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...
5
votes
1answer
160 views

FindMinimum's WorkingPrecision behaviour

I discovered the following behaviour when using FindMinimum for constrained optimization: ...
5
votes
1answer
139 views

Inaccurate Heliocentric coordinates of PlanetaryMoonData

I have noticed that the heliocentric coordinates obtained with PlanetaryMoonData are very inaccurate. Fore example, consider the Galilean moons of Jupiter: ...
5
votes
1answer
66 views

Mysterious behavior of Precision for complex arrays

Mysterious behavior of Precision: {{1.0+I*0.0},{0.0+I*0.0}} // SetPrecision[#,30]& // Precision // Print; ...
5
votes
0answers
91 views

Is there a problem with some of the curated Star Data?

I'm not really sure if I'm doing something wrong, or if there's a problem with some of the Mathematica curated data on stars. My problem is this: I'm trying to find the location (latitude and ...
5
votes
1answer
128 views

Specifying WorkingPrecision in LogLogPlot produces invalid plots [duplicate]

I seem to have found a bug with LogLogPlot in Version 10. If I specify a working precision, the function produces total garbage. Here is a simple example. The first ...
5
votes
0answers
64 views

The change of precision doesn't work in ParallelDo. Is it a bug in Parallel?

Cross-post: http://zhidao.baidu.com/question/2075301703219376588.html Input: ...
4
votes
1answer
348 views

How to calculate accurate answer in Mathematica?

I accidentally discovered for myself, that Mathematica outputs inaccurate answer. For instance, if I take $\sin(2 \cdot \pi \cdot 0.5) = 0 $, then in Mathematica it is: But if I calculate it on ...
4
votes
1answer
148 views

A difficult precision problem

I need to calculate values of a highly nonlinear recursive function, and I am confused by the results Mathematica is returning. ...
4
votes
2answers
264 views

Explicit digit-count (precision) of real number

I'm trying to do something which seems like it should be simpler than it is (at least in my attempts at it). I have some code where I read in a list of numbers generated for me by a coworker. These ...
4
votes
1answer
187 views

Padding plot ticks with zeros on the right

I would like to know how can I make a real-valued plot tick pad with a zero to the right of the decimal point on integer values. This is what I have: ...
4
votes
2answers
77 views

numerical precision in output file

I want to write the numerical results of a computation to a file which is to be read in Fortran. The data looks like: ...
4
votes
1answer
252 views

How to find derivative of a numerical solution, where precision is ambiguous?

I am trying to take the derivative of a numerical solution. I am concerned that the way I'm doing this may be problematic due to numerical error; I think there must be a better way but I'm not very ...
4
votes
1answer
326 views

ParallelTable and Precision

I'm using ParallelTable[] to calculate a function over a range of my parameters , ($\omega,\ell$). This seems to be working well (in terms of speed increase) except ...
4
votes
1answer
92 views

What is a sufficient decrease in the merit function?

As far as I understand, the merit function measures how far the data is from the fitted function. I am calulcating the second partial derivative of a function, and then numerically finding its maxima ...
4
votes
2answers
499 views

Importing High Precision (22 digits) data from a file

I want to import list from a file and I am using ReadList but my data is in format like this 8.2457409790900004e+08 but it i being imported like $8.24574*10^8$. Is ...
4
votes
1answer
81 views

How can I completely discard decimals after a set number of significant figures?

I have a number with a long decimal tail, like x=1.23456789789456123 and I would like to (i) keep the first $n$ significant figures, and (ii) completely discard ...
4
votes
1answer
42 views

Failure in use of SetPrecision with Filter

I am working with a narrow band filter and I wish to use a high precision version. The filter is defined using Integers with Laplace variable s. Here is the, rather horrific, equation: ...