Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arbitrary-precision]

Questions on the arbitrary precision capabilities of Mathematica.

0
votes
0answers
3 views

I have a problem with numerical precision of the N command

I am trying to learn Mathematica. I found some unusual behavior with the N command. Here is my code. ...
3
votes
0answers
28 views

DumpSave and precision of interpolation data

Consider the following prec = 32; x = N[Range[0, 1, 1/10], prec]; f = Interpolation[Transpose@{x, y}]; Then ...
1
vote
1answer
62 views

How can I suppress the warning $\mathrm{\it precision\ may\ be\ lost}$?

When I import data from a .dat file, V11.3 emits the message: is too small to represent as a normalized machine number; precision may be lost. How can I close the ...
1
vote
2answers
91 views

Truncate a number in mathematica

I want to truncate a simple number to n decimal digits. For example, 2/3. I used f[x_, n_] := N[IntegerPart[x 10^n]/10^n] but I get ...
0
votes
1answer
49 views

How to get the correct result in a simple operation in Mathematica

I have the following values for x[[i]], y[[i]] and A[[i,j]]: ...
0
votes
1answer
41 views

Simple division with high precision in Mathematica [closed]

I want to do a simple division i.e. 0.70524/0.51824 . What I want is to find the result of the roundation of this division for precision from 1 to 19 decimal digits....
4
votes
0answers
73 views

Arbitrary Precision, Nearly-Singular Matrices, and LinearSolve

I have been trying to solve a nonlinear eigenvalue problem, $\mathbf{M}(\lambda) \mathbf{v} = 0$, in Mathematica using Newton's method. The core of the algorithm relies upon an inverse iteration, ...
5
votes
2answers
340 views

Why does N not upgrade precision? [duplicate]

Precision[N[1.0, 20]] Precision[N[1, 20]] MachinePrecision 20. It would be so much more intuitive and less error prone, if <...
8
votes
1answer
139 views

Plot3D discrepancy between MMA 10 and 11.3 - possible small numbers issue

I'm having some troubles with the following code I wrote in MMA 10 some time ago: ...
5
votes
2answers
107 views

Early vs. late application of arbitrary precision

The following arbitrary-precision computations, in which arbitrary precision is applied early (to the inputs), both work as expected: ...
6
votes
1answer
288 views

What is wrong with importing Real32 or Real64?

Those who visit the chat might have seen the question of varkor. I'm posting it here in the hope that I have missed something. Assume you have a real number ...
6
votes
1answer
176 views

Mathematica precision common problems

When I do something a little bit more complicated than standard documentation examples, I often hit precision problem. Or I accidentally disprove Riemann hypothesis Like this ...
1
vote
1answer
64 views

Interpolation function precision in multi dimentional case

I have this interpolation example ...
3
votes
1answer
145 views

Can NDEigensystem use arbitrary precision arithmetic?

Consider the following computation of an eigenfunction of 1D Laplacian on the interval of $[0,\pi]$: ...
9
votes
2answers
1k views

Fast integer square-root

I'm looking for the highest-performance method of calculating integer square roots in Mathematica of very big arbitrary-precision numbers. As an example testcase, I use: ...
2
votes
1answer
148 views

plot of polynomial expression failed [duplicate]

I want to plot a polynomial expression for {a,0,1}: ...
1
vote
1answer
65 views

Rigorous error bounds for `NIntegrate`

Suppose I want to numerically evaluate an integral of the form $$\int_{-\infty} ^\infty f(x) \mathrm{d}x $$ with error not exceeding some positive bound $\epsilon$. Is there a way to do this using <...
6
votes
4answers
232 views

How do I convert an inexact number smaller than $MinMachineNumber to machine-precision?

I was trying to convert some arbitrary-precision numbers to machine-precision numbers using N[myNumber,MachinePrecision]. But, although my test number did lose some ...
0
votes
0answers
56 views

Arbitrary precision calculation makes my computer hang

I have this code list = Accumulate@Tan[N[Range[10^8]]]; // AbsoluteTiming and the timing is slightly more than two seconds. Now if I try to compute this ...
18
votes
2answers
656 views

Error and uncertainty propagation: Is using Precision/Accuracy a sound strategy?

Questions What are the available resources to deal with experimental error and uncertainty propagation in Mathematica? Given that Mathematica already uses linearized model of error propagation on ...
16
votes
2answers
898 views

How are Accuracy and Precision related Mathematica for a given operation?

The common understanding for Accuracy and Precision in English language is given by this figure. Inspired by this question I have a follow up question relating ...
6
votes
1answer
577 views

Really understanding precision

I've been reading the documentation in Mathematica about precision, namely: Exact and Approximate Results Arbitrary-Precision Numbers Arbitrary-Precision Calculations Machine-Precision Numbers ...
0
votes
1answer
81 views

Simple precision issue [closed]

Considering binomial expansion $1 = (p+(1-p))^n = \sum_{k=0}^n p^n (1-p)^{n-k},$ which is true for any real value of $p$, I'm getting diverging results when I numerically evaluate the above even ...
3
votes
1answer
54 views

Constructing a List from a Decimal Number

I am trying to get from a number such as $12.345$ to a list $\{1,2,3,4,5\}$. My best attempt so far has been: First[RealDigits[12.345]] however this of course ...
2
votes
0answers
69 views

Buggy behavior of EllipticK with arbitrary precision input and $MinPrecision

I have encountered weird buggy behavior of EllipticK with arbitrary precision input and when $MinPrecision is set. Consider the following code: ...
15
votes
2answers
416 views

Why does SetPrecision not apply to 0?

Is there a rationale why SetPrecision works on integers except for 0? SetPrecision[1,5] 1.0000 ...
12
votes
1answer
684 views

Why does 1 - Exp[-10.0^12] cause an out-of-memory error?

I would like to understand why evaluation of the expression 1 - Exp[-10.0^12] causes an out-of-memory error and how can I prevent such errors when calculating ...
3
votes
1answer
67 views

Why does SetPrecision drop “unknown” digits if precision requested is Infinity but retain them if it's finite?

I was trying to reset the imprecision record of a number like 0.0076022266122755632`1.025 by calling SetPrecision with second ...
13
votes
0answers
204 views

Bug? Numerical calculation error with FullSimplify and arbitrary precision

Bug introduced after 5.2, fixed in 8.0, reintroduced in 9.0 and persisting through 11.2 Is this a bug? If I do FullSimplify[n E^(0``10 n)] then it returns <...
0
votes
2answers
231 views

Integrate over sharp peak [closed]

Hi I have a function that has a sharp spike. I need to NIntegrate over the peak but it seems that NIntegrate does not handle it well. Actually as far as I can tell, even the evaluation of the ...
3
votes
0answers
107 views

Does Mathematica implement its own methods of tracking precision? [closed]

I know that for arbitrary precision arithmetic Mathematica uses GMP. But apart from just providing arbitrary precision, Mathematica also does precision tracking for its arbitrary-precision numbers, so ...
8
votes
1answer
182 views

Arbitrary-Precision Arithmetic behaves unexpectedly

I want to understand how small numerical errors propagate through a computation and may drastically change the final result. To this end, I consider a toy world in which every number is limited to ...
1
vote
1answer
81 views

Finding the probability of one or more very unlikely successes in an enormous number of Bernoulli trials

I'm trying to find an upper bound on the complexity of a self-replicating matter pattern in order for it to be at all probable for it to spontaneously occur in the universe. The idea being, if some ...
1
vote
1answer
105 views

Specify a decimal value as exact

I would like to specify that a number is exact, even though it contains a decimal point. For example, I would like to be able to write some variation of 3.4 and ...
4
votes
1answer
195 views

How to disable roundoff error tracking in arbitrary precision arithmetic?

In my calculations I need some larger precision. But due to the fact that I iteratively refine the results to compensate for rounding errors accumulated in previous iteration, Mathematica's arbitraty ...
2
votes
0answers
65 views

Why is distributing the definitions of a list of arbitrary precision numbers so slow?

For a parallel application I need to make a large list of numbers available to the parallel kernels, which I do using DistributeDefinitions. I have noticed that this is much slower when the numbers ...
0
votes
0answers
73 views
4
votes
2answers
142 views

Why do I get number with Precision larger than error estimate?

I'm trying to integrate a large function like this ...
2
votes
1answer
124 views

Why does this expression involving HypergeometricU and $MinPrecision crash?

Bug introduced in 10.0 and fixed in 11.0 Can somebody help me understand why the following code snippet cause the Mathematica kernel to crash (without producing any further error messages)? ...
6
votes
2answers
205 views

$N[a,50]-N[a,10]=0$ why? and what's the rationale behind?

Let $a=\sqrt{3}$. What's the point of having In[102]:= N[Sqrt[3],100]-N[Sqrt[3],10] Out[102]= 0.*10^-10 ? Let's imagine I wanted to get the difference between ...
9
votes
1answer
154 views

Has “faster arbitrary precision computation of elementary functions” been incorporated into Mathematica?

In this Wolfram Conference talk from last year, "Faster Arbitrary Precision Computation of Elementary Functions", they talk about R&D for algorithms to numerically evaluate elementary functions ...
2
votes
2answers
106 views

Mathematics arbitrary precision evaluation [duplicate]

I am trying to solve a simple expression: where a = 77617, and b = 33096. Wolfram|Alpha returns a correct result, using ...
1
vote
1answer
108 views

Why do these calculations 'stop'? [duplicate]

Question 1: If I change guess to a integer, for example guess = 1 then ListPlot already stops at $n=50$. This seems strange to me, any ideas on why this happens? ...
6
votes
1answer
516 views

Machine-Precision and Arbitrary Precision [closed]

What is meant by a machine number in the Mathematica documentation? What is the difference between machine-precision and fixed-point precision? What is arbitrary precision?
0
votes
1answer
161 views
3
votes
1answer
228 views

WorkingPrecision in NDSolve causes failure when solving a simple PDE

I have fivefold multiple integral and I wanted a speed calculations. I came across on this Question and had already begun the problems. Here is a toy example with simple double integral: ...
4
votes
1answer
209 views

MachinePrecision versus $MachinePrecision in NDSolve

I'd like to understand why one of these inputs gives me an error and the other doesn't: ...
2
votes
1answer
281 views

How to tell Mathematica to treat all numbers (including those in decimal form) as arbitrary precision numbers

I have code that is essentially numerical. It uses functions like NDSolve and NIntegrate. But in most interesting cases, the ...
11
votes
1answer
493 views

NDSolve`FiniteDifferenceDerivative gives wrong result when the precision is not MachinePrecision

Bug introduced in 8 or earlier and persisting through 11.0.1 or later I want to get a pseudospectral differentiation matrix by NDSolve`FiniteDifferenceDerivative. ...
5
votes
1answer
197 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. ...