# Questions tagged [accuracy]

For questions about characterizing or improving the accuracy of a computational method.

66 questions
Filter by
Sorted by
Tagged with
8 votes
1 answer
632 views

### Accurate and efficient computation of the inverse Langevin function

The Langevin function $\mathcal{L}(x) = \mathrm{coth}(x) - \frac{1}{x}$ occurs in computations related to elastomers and paramagnetic materials. It is easily computed accurately and with high ...
0 votes
1 answer
57 views

0 votes
1 answer
1k views

17 votes
1 answer
3k views

### How can I avoid catastrophic cancellation?

I have the following formula that I need to rewrite in order to avoid catastrophic cancellation. $$y =\sqrt{\frac{1}{2}\left(1-\sqrt{1-x^{2}}\right)}$$ As $x$ becomes smaller, $\sqrt{1-x^{2}}$ ...
3 votes
1 answer
156 views

### How to get a more accurate cancelation

I shall try to get to the point, so let me know if there is something left and you need more details. I am solving a couple of equations that are not coupled explicitly, but their corresponding ...
5 votes
1 answer
156 views

4 votes
2 answers
369 views

### Intervals where the sign of a polynomial can be computed reliably

This is a follow-up of a previous question. Let $p$ be a polynomial with floating-point coefficients. Is there a method for finding intervals where evaluating $p$ in floating-point arithmetic always ...
6 votes
1 answer
205 views

### Does the IEEE-754 standard mandate that exp2 is rounded correctly?

The IEEE Standard for Floating-Point Arithmetic section "9.2 Recommended correctly rounded functions" lists functions that are recommended (but not required) by a language standard to provide, among ...
6 votes
3 answers
177 views

### Accurate evaluation of the sign of a polynomial

Let $p$ be a polynomial with floating-point coefficients and let $a$ be a floating-point value. Is there a method for accurately evaluating the sign of $p(a)$ in floating-point arithmetic? I don't ...
1 vote
1 answer
182 views

0 votes
1 answer
109 views

3 votes
1 answer
196 views

### Achieving high relative accuracy (vs. absolute accuracy) using spectral methods

Problem I have a PDE that I'm trying to solve with spectral methods. The solution $y$ is always positive, and decays as $y \propto e^{-ax}$ for large $x$. The domain is $[0, \infty)$. (There are ...
9 votes
0 answers
516 views

### Updating matrix diagonal with Woodbury matrix identity and maintaining numerical accuracy

I have a dense matrix A and its corresponding inverse $A^{-1}$. The Woodbury matrix identity states: $$(A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1} + VA^{-1}U)^{-1}VA^{-1}$$ I wish to perform small ...
4 votes
2 answers
627 views

### Accuracy of numerical methods in finding eigenvalues

I have a problem with assesing the accuracy of my numerical calculation. I have a 2nd order ODE. It is an eigenvalue problem of the form: $$y'' + ay' + \lambda^2y = 0,$$ and the boundary condiations ...
0 votes
1 answer
848 views

### Order of accuracy of DGFEM or FEM

I know that it is possible to determine the theoretical order of accuracy (B) of numerical solutions in FVM (for instance for a steady problem in which only the central differencing scheme (CDS) is ...
0 votes
0 answers
53 views

### Order of accuracy of linearised vs non-linear system

Does the order of accuracy of a combination of schemes applied to solve a system of non-linear equations, match those of the same schemes applied to the linearised version of the system? In other ...
5 votes
1 answer
242 views

### Accuracy of finite differences

I'm currently reading this paper, and I'm a bit confused about how they compute the accuracy of their algorithm. In the aforementioned paper, they investigate the regularized long-wave equation:  ...
7 votes
1 answer
591 views

### What is the numerical difference between abs(z)^2 and z x z*, where z is a complex number

I am doing research in electromagnetics (a branch of physics) and I deal with complex numbers in my computing tasks (I use MATLAB). Let's say $z$ is a complex number. To calculate the square of the ...