Questions tagged [arbitrary-precision]

Questions on the arbitrary precision capabilities of Mathematica.

Filter by
Sorted by
Tagged with
1
vote
1answer
72 views

InverseFunction: Precision problem

I define a function SS[t] as an inverse function: ...
2
votes
2answers
90 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
78 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 ...
0
votes
0answers
49 views

Use Check in a While loop without wasting the calculation

I am trying to generate and solve a matrix that tends towards being singular using variable arbitrary precision to ensure accuracy. Consider, for example, a matrix with tunable singularity: ...
0
votes
0answers
31 views

How to avoid machine underflow for plotting and integrating?

I am trying to integrate the following integrand, which I have plotted: ...
0
votes
1answer
60 views

Solving linear systems efficiently

In certain calculation I encountered a system of linear equations in 144 variables, and it takes hours to compute. Most probably the reason is that coefficients are really huge integers (about $10^{50}...
2
votes
1answer
83 views

Difficulty when trying to find roots to high accuracy

I'm working with the logistic map $f(x,\lambda)=4\lambda x(1-x)$, and iterations of the logistic map $f^{(2^n)}(x,\lambda)=f^{(2^{n-1})}(f^{(2^{n-1})}(x,\lambda),\lambda)$. There are some special ...
1
vote
4answers
142 views

Can I change the default behavior so that “0.1” is interpreted as “1/10” automatically?

Consider the function f[a_] := NIntegrate[Sqrt[a + Log[x]], {x, 1, 10}, WorkingPrecision -> 30]. With this definition, I cannot call ...
0
votes
0answers
38 views

Increase precision of ConvexHullMesh

I want to generate a set of equations for all planes in the convex hull as specified in this question. The problem is that the generated set of equations don't correctly cover all the points. I run a ...
1
vote
0answers
100 views

FindMaximum does not use requested WorkingPrecision

I think that there is a bug in the way FindMaximum handles WorkingPrecision for constrained problems. Has anyone encountered a similar problem before? Is there a work around? Here is an example in ...
1
vote
0answers
39 views

`LinearSolve` in arbitrary precision has a sudden change in performance as the size of a problem is gradually increased

It is expected that calculations in arbitrary precision are much slower than in machine precision. However, LinearSolve has an unexpected behavior: there is a ...
1
vote
2answers
121 views

Does SetPrecision[x, Infinity] expose the internal exact number in the approximated number?

What I already know (maybe) : My theory about Mathematica's way of implementing approximated number An number approX with arbitrary precision ...
0
votes
1answer
43 views

How to initialize arbitrary precision?

How do I calculate $$\frac{1}{{\frac{1}{7 \times 10^7}- \frac{8\times10^{17}\times 3.1\times 10^7}{6.7 \times 10^{-11}\times \left(1.9 \times 10^{27}\right)^2} }}\tag{1}$$ To arbitrary precision? I ...
0
votes
0answers
63 views

Creating an interpolation matrix efficiently

I would like to know if there is a fast way to create the following matrix (note that the matrix is defined with arbitrary precision): ...
1
vote
1answer
69 views

Dealing with zero at high precision

I am using mathematica to deal with rational functions, $p(x)/q(x)$, where the polynomials, $p,q$ have a high degree and coefficients with high order of precision, e.g: ...
2
votes
0answers
43 views

Set Underflow precision in Mathematica 12 same as version 11.x [duplicate]

It seems like Mathematica version 12 sets arbitrary underflow precision depending on the function, but I would like the underflow precision to be same as what was for previous version of Mathematica ...
0
votes
0answers
42 views

What is the limit of digits to show in the conversion of an exact number to an Arbitrary Precision Number?

By executing something like N[π, c] what is the maximum positive integer value c can have until the output is compromised by ...
4
votes
0answers
126 views

How does Mathematica evaluate N[π, 30] == π?

I want to know how N[π, 30] == π works. The result is True. I wonder whether the exact number ...
5
votes
1answer
114 views

Linear Algebra in Arbitrary Precision - SLOW

I am trying to implement an arbitrary precision algorithm, but I am not very familiar with Mathematica or arbitrary precision arithmetic. I was able to implement it but surprised by how much slower it ...
1
vote
0answers
37 views

Changing machine precision notebook-wide leads to peculiarities

For a project of mine it is preferrable to set notebook precision globally. I have done so by using the answer in Global precision setting. The idea is to dynamically create a ...
0
votes
1answer
72 views

Why this very simple problem turns to “Indeterminate”?

Why the following calculation gives Indeterminate value? ...
0
votes
1answer
68 views

Preventing Mathematica from considering small values to be equal to zero [duplicate]

In my calculations I have a variable (say z) which can be an argument of Log, say, z Log[z]. ...
1
vote
1answer
88 views

Number definition and approximation

I run these lines: a = 0.833 SetPrecision[a, 20] and this is the output: 0.833 0.83299999999999996270 I expected to ...
5
votes
0answers
51 views

DumpSave and precision of interpolation data

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

How can I suppress the warning “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
922 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
56 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
56 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....
6
votes
0answers
136 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
427 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 <...
9
votes
1answer
195 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
184 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: ...
8
votes
1answer
697 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
259 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
149 views

Interpolation function precision in multi dimentional case

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

Can NDEigensystem use arbitrary precision arithmetic?

Consider the following computation of an eigenfunction of 1D Laplacian on the interval of $[0,\pi]$: ...
8
votes
2answers
2k 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
169 views

plot of polynomial expression failed [duplicate]

I want to plot a polynomial expression for {a,0,1}: ...
1
vote
1answer
91 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
385 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
57 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 ...
19
votes
2answers
868 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 ...
20
votes
2answers
2k 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 ...
7
votes
1answer
710 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
82 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
65 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
77 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
466 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
771 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
81 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 ...