3
votes
2answers
137 views

Floating point addition not associative

Can anybody explain the following behavior? x = 0.2 + (0.3 + 0.1); y = (0.2 + 0.3) + 0.1; x == y (* -> True *) But actually the variables do not exactly ...
12
votes
4answers
298 views

Elegant high precision `log1p`?

Sometimes it is hard to understand how numerical expressions are evaluated. I remember reading claims by Wolfram on how smart the Kernel is to evaluate expressions trees numerically by recognizing ...
13
votes
1answer
134 views

CompiledFunction returns machine numbers smaller than $MinMachineNumber

When thinking on the workaround for this LogLogPlot bug suggested by halirutan I noticed that CompiledFunction actually can ...
5
votes
3answers
232 views
5
votes
1answer
158 views

Accurately evaluating the hypergeometric function

As part of another problem, I am working to evaluate hypergeometric functions such as Hypergeometric2F1[1, 1, n, -1] for large $n$. I am hoping to obtain at ...
1
vote
3answers
228 views

Making a calculation with high precision

I would like to make the following calculation: 1/Sqrt[1 - (150^2 10^(-4))/(9 10^16.)] - 1 Mathematica 8 returns 0. The result is obviously not 0, but my ...
1
vote
1answer
206 views

Why is arithmetic faster for inexact arithmetic?

I have been trying to compute eigenvalues of a rather sizable matrix A, about $500 \times 500$ (but sparse). I asked Mathematica to compute ...
-2
votes
1answer
185 views

Problem with solving a differential equation [closed]

I need to solve the following differential equation: NDSolve[{R[r, t], R[r, 0] == r/1000}, R, {t, 0, 30}, {r, 1, 30}] Where ...
8
votes
2answers
332 views

Precision differences

I run this sum and get the symbolic answer below : Sum[ (1/(k^2 - k) - 1/k^2), {k, 2, Infinity}] $2 - \frac{\pi^2}{6}$ I look up the sequence on OEIS and ...
4
votes
1answer
187 views

Why to do parentheses change the results of a calculation?

I'm getting results that are sensitive to where I place parentheses with respect to operations that are associative1 (and should thus be insensitive to such placement). For example, if I define2 ...
12
votes
4answers
1k views

Numerical underflow for a scaled error function

I calculate scaled error function defined as f[x_] := Erfc[x]*Exp[x^2] but it can not calculate f[30000.]. ...
24
votes
2answers
782 views

Meaning of backtick in floating-point literal

If I compute, say, 1/3//N, Mathematica displays 0.333333 as the result. When I copy that output to use elsewhere, the paste ...