Relative error of x² and e^x in floating point arithmetic

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
yenbibi
Messages
2
Reaction score
0
With exact rounding, we know that each elementary operation has a relative
error which is bounded in terms of the rounding unit n; e.g., for two foating point
numbers x and y, (x + y) = (x + y)(1 + E); |E| <= n. But does a similar result hold
for elementary functions such as sin, ln and exponentiation? In other words is it true
that for a function f(x), (f(x)) = f(x)(1+CE), for some (hopefully small) positive constant C?
Note: E=epsilon
a) Consider f(x) = x2. Compute the a formula for the relative error in f(x)
assuming the relative error in x is e and ignoring error in evaluating f(x). Does
(f(x)) = f(x)(1 + CE) hold for this example?
b) Repeat question a but now for f(x) = ex.
c) Show that if (f(x)) = f(x)(1 + CE) holds, then f(x) must have the form
f(x) = axb with constants a and b.
 
Physics news on Phys.org
You have posted several of what are obviously homework problems in a forum that specifically says "this forum is not for homework". In any case, we are not going to do the problems for you. What have you tried and where are you stuck?

You might start by stating the definition of "relative error". After you know what that means, the rest of the problem should be just arithmetic.