Questions tagged [floating-point]
Mathematical questions concerning floating point numbers, a finite approximation of the real numbers used in computing.
466
questions
0
votes
1
answer
55
views
How to compute the successor to a given floating point number
Let $F$ the set of all floating point number $n2^e$ such that $ -2^{53} < n < 2^{53}$ and $−1074 \leq e \leq 970$. Let $F^* = F - \{\max(F)\}$
I assume $F$ not to be dense, and therefore there ...
4
votes
1
answer
151
views
1
vote
0
answers
159
views
Show that $x+1$ is not backward stable
Suppose we use $\oplus$ to compute $x+1$, given $x \in \mathbb{C}$. $\widetilde{f(x)} = \mathop{\text{fl}}(x) \oplus 1$. This algorithm is stable but not backward stable. The reason is that for $x \...
1
vote
2
answers
173
views
Another way to compute the epsilon machine
Why the next program computes the machine precision? I mean, it can be proved that the variable $u$ will give us the epsilon machine. But I don't know the reason of this.
Let
$a = \frac{4}{3}$
$b = a −...
3
votes
0
answers
152
views
Justification for the definition of relative error, why is it not a metric?
The absolute error and relative error operators are very commonly encountered while reading about topics from the fields of floating-point arithmetics or approximation theory.
Absolute error is
${ae(a,...
0
votes
2
answers
99
views
Tricks in the floating point operations for better numerical results
I'm attempting to comprehend a passage from the book "Computational Modeling and Visualization of Physical Systems with Python" which I may be mentally fatigued to grasp. Here's the issue: ...
2
votes
1
answer
182
views
Is there a stable algorithm for every well-conditioned problem?
Reading these notes on condition numbers and stability, the summary states:
If the problem is well-conditioned then there is a stable way to solve it.
If the problem is ill-conditioned then there is ...
0
votes
0
answers
27
views
Floating Point Precision Algorithm
In my database, data stored as a precision of 10 digits Decimal(30,10).
User can enter x or 1/x. I need to save in 1/x. If user enters ...
0
votes
0
answers
60
views
Secant method optimization - initial guesses with floating point precision?
Say I want to find the root of $f(x) = e^{-x} - 5$, and assume I start with initial guesses $x_0 = -3$ and $x_1 = 3$.
I define my update function as $x_i = x_{i-1} - f(x_{i-1}) * \frac{x_{i-1} - x_{i-...
1
vote
1
answer
172
views
Does using smaller floating-point numbers decrease rounding errors?
I started learning about floating point by reading "What Every Computer Scientist Should know About Floating-Point Arithmetic" by David Goldberg. On page 4 he presents a proof for the ...
1
vote
0
answers
22
views
How to calculate converted value for each number in a set using a conversion rate, having its sum equal exactly a rounded fixed converted total?
Say I have three numeric values: a total, converted total, and a conversion rate. These are fixed, given numbers, and the two totals always have the precision of two decimal places.
...
0
votes
0
answers
56
views
Finding an expression for $\sqrt{x^2 + z^2}$ that is more precise in floating point arithmetic?
Assuming that both $x$ and $z$ have no representation errors, and that $\vert z^2 \vert \ll \vert x^2 \vert$. There must exist an expression for $\sqrt{x^2 + z^2}$ that is the same in exact arithmetic ...
0
votes
0
answers
38
views
How does a computer calculate matrix scalar multiplication order of operations (flops)
I am trying to understand the number of flops in the Householder QR factorization. In one line of the algorithm, it says
\begin{gather*}
v = v / \lVert v \rVert_2
\end{gather*}
I was wondering what ...
1
vote
1
answer
168
views
On the axioms of floating-point arithmetic
As I understand there are two "axioms" that should be satisfied in floating-point arithmetic:
$$\forall x\in \mathbb R,\ \exists |\varepsilon|\leq\varepsilon_{\text{machine}},\ \mbox{fl} (x) ...
0
votes
1
answer
60
views
Representation of rounding error in floating point arithmetic. [duplicate]
It is well known that in a Floating point number system:
$$
\mathbb{F}:=\{\pm \beta^{e}(\frac{d_1}{\beta}+\dots +\frac{d_t}{\beta^t}): d_i \in \{0,\dots,\beta-1\},d_1\neq 0, e_{\min}\leq e \leq e_{\...