Questions tagged [floating-point]
Mathematical questions concerning floating point numbers, a finite approximation of the real numbers used in computing.
473 questions
13
votes
4
answers
942
views
Is computing a floating-point mean more accurate when dividing before or after summation?
This now-deleted answer to a Code Review question about statistics in Java asserts that, when all values are floating points, computing the mean of several values as $\sum_{i=1}^n \frac{x_i}{n}$ will ...
-1
votes
1
answer
122
views
How do we pick how many decimals to use when solving problems? [closed]
I was working on an exercise from a chemistry textbook which was about an application of the osmotic pressure formula.
When I checked the solution the answer give was $62.05$ while I was getting as a ...
1
vote
0
answers
54
views
Stability of specific floating point operation algorithm
Problem: We want to determine whether the following algorithm is stable or not. Data is $x_{1},x_{2} \in \mathbb{C}$, Solution is $x_{1}(x_{2}+1)$, computed as $\text{fl}(x_{1}) \otimes (\text{fl}(x_{...
0
votes
0
answers
58
views
SOP or POS for Kahan sum
For this expression:
...
2
votes
1
answer
83
views
What is the stochastic error introduced by a converting a random (real) number to a floating point?
What is the variance of the relative error introduced by a converting a random real number to a float?
I was able to develop a formula which, empirically, is off by a factor of 2.
Let $\mathcal F \...
4
votes
2
answers
217
views
Why does this modified Newton's method fail to converge for N > 1 iterations?
I am investigating the behavior of an approximation of 1/sqrt(x) which uses a similar method to the more famous Quake III "Fast Inverse Square Root". Quake's FISR uses an approximation of ...
2
votes
2
answers
237
views
Accurately Converting Between Binary Floating Point and Decimal Character String.
This must have been studied before, and has been one of the confusion I've been having.
Suppose we want to convert a astronomically big floating point number (so big that it's floating point ...
1
vote
0
answers
72
views
Necessary condition for sum of floating point numbers x + y to be x
In my numerical analysis text book there is this problem
Assume a machine with base $\beta$, and $p$ mantissa digits, and that $u$ is the round-off error of a particular number. The number $∣x∣=(0....
0
votes
1
answer
104
views
Forward Stability of $f(x) = x+1$
I was reading: https://www.cs.usask.ca/~spiteri/CMPT898/notes/numericalStability.pdf
Where I read that the algorithm $\tilde{f}(x)=fl(x)\bigoplus1$ for the problem $f(x)=x+1$, is stable but not ...
4
votes
2
answers
182
views
pow and its relative error
Investigating the floating-point implementation of the $\operatorname{pow}(x,b)=x^b$ with $x,b\in\Bbb R$ in some library implementations, I found that some pow ...
8
votes
0
answers
196
views
Algebraic Structures involving 𝙽𝚊𝙽 (absorbing element).
IEEE 754 floating point numbers contain the concept of 𝙽𝚊𝙽 (not a number), which "dominates" arithmetical operations ($+,-,⋅,÷$ will return ...
3
votes
0
answers
77
views
Solve $10^{10^z} = 10^{10^x}+10^{10^y}$ for $z$ with floating point accuracy
In the following equation
$$10^{10^z} = 10^{10^x}+10^{10^y}$$
I want to find an algorithm that computes $z$ in a floating point accurate manner given any values of $x$ and $y$ (e.g. $x=y=2000$). The ...
2
votes
2
answers
137
views
How to transform this expression to a numerically stable form?
I have this function
$$f(x, t)=\frac{\left(1+x\right)^{1-t}-1}{1-t}$$
Where $x \ge 0$ and $t \ge 0$.
I want to use it in neural network, and thus need it to be differentiable.
While it has a ...
1
vote
0
answers
129
views
Proof that $\epsilon_{mach} \leq \frac{1}{2} b^{1-n}$
I have a question about the proof of the following statement:
For each set of machine numbers $F(b, n, E_{min}, E_{max})$ with $E_{min} < E_{max}$ the following inequality holds: $\epsilon_{mach} \...