Skip to main content

All Questions

4 votes
2 answers
110 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 ...
emacs drives me nuts's user avatar
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,...
user2373145's user avatar
0 votes
0 answers
40 views

How are results guaranteed in algorithms that include intermediate approximation?

Let me elucidate this vague question with an example. Consider for example the following Gauss sum of roots of unity $N=(e^{2\pi i/5} + e^{2\pi i/4} e^{4\pi i/5} + e^{4\pi i/4} e^{8\pi i/5} + e^{6\pi ...
Tejas Rao's user avatar
  • 1,950
0 votes
1 answer
632 views

What is the meaning of $1$ in a relative error?

If we measure a length and is measured as $12.5$ meters long, accurate to $0.1$ of a meter this means the absolute error is $0.05$m. The relative error is: $\frac{0.05}{12.5} = 0.004$. This means that ...
Jim's user avatar
  • 1,609
2 votes
2 answers
2k views

Square roots by Newton’s method

The following Python program implements Newton’s method for computing the square root of a number: ...
Géry Ogam's user avatar
0 votes
2 answers
76 views

Easy example of $Ax =b$ floating point arithmetic.

Solve $Ax =b$ with two-digit floating-point arithmetic. We have $$ A= \begin{pmatrix} 1 & 1\\ 1 & 0,99\\ \end{pmatrix} $$ and $$ b = \begin{pmatrix} -1 \\ 1 \\ \...
RukiaKuchiki's user avatar
  • 1,143
3 votes
1 answer
365 views

Double-precision algorithm for inverse log gamma or log factorial?

Question in a nutshell: Can anyone point me to an algorithm for computing to double-precision floating-point (roughly 16 digits) the inverse of either log gamma or log factorial? In other words, if y =...
Brian Kennedy's user avatar
4 votes
2 answers
613 views

How to convert $\ln x - \ln y$ into a more accurate floating point representation?

I have an equation $\ln(x) - \ln(y)$ where x and y are very close to eachother. For example if $x = 5.1234$ then something like $fl(\ln(5.1234)) = 1.6338$ (with 4 significant digits). If $y = 5.1233$ ...
Josh Susa's user avatar
  • 153
2 votes
1 answer
1k views

How to approximate relative error further?

Background and original problem: I want to minimize the difference (error) of a numerical derivative approximation of a function and its true derivative. Let $f(x) = \sin(x) $ be the anti-derivative ...
zython's user avatar
  • 470
1 vote
0 answers
92 views

If $0.2349$ is approximated to $0.2299$, what is number of significant figures in such approximation?

If $0.2349$ is approximated to $0.2299$, what is number of significant figures in such approximation? Let $x_T=0.2349$, $x_A=0.2299$, then absolute error = $|x_T-x_A|=0.0050=\frac{1}{2}\times 10^{-2}=...
user1942348's user avatar
  • 3,911
2 votes
0 answers
190 views

How are Floating Point approximations done by integer operations? (Source Wikipedia)

Please help me understand the mathematics involved in Wikipedia page of Floating point, section of Piecewise Linear approximation to exponential and logarithm. Following is the link Piecewise linear ...
tech81's user avatar
  • 21
1 vote
1 answer
268 views

error bound in function approximation algorithm

Suppose we have the set of floating point number with "m" bit mantissa and "e" bits for exponent. Suppose more over we want to approximate a function "f". From the theory we know that usually a "...
user8469759's user avatar
  • 5,317
4 votes
0 answers
251 views

Can trigonometric functions for double precision be implemented in terms of those for single precision?

In some program environments like GLSL there is support for single and double precision numbers for arithmetic and square roots computation, but only single precision trigonometric functions are ...
Ruslan's user avatar
  • 6,875
0 votes
1 answer
65 views

approximation using floating point arithmetic

Let $x=2.14366$ and $y=2.14363$ and $d=x-y.$ If $d*$ is the value of d computed using $5-$digit decimal floating point arithmetic, find the relative error. For this question I know how to calculate ...
Massin's user avatar
  • 314
5 votes
4 answers
4k views

How to extract fraction from a floating point number

I'm making some tests with float type (floating point number) with programming and in some of my tests I need to extract the fraction that originates the float value. Let $ x $ be a floating point ...
Talysson's user avatar
  • 153

15 30 50 per page