1

absolute error and relative error with at least 3 digits chopping for $\frac{{1}}{A}$ $A=\frac{{e}}{2.71828}-2.71828* e^{{-1}}$

My solution:

\begin{align} A=\frac{{e}}{2.71828}-2.71828* e^{{-1}} &= 1.34530544*10^{{-6}} \end{align} So \begin{align} \frac{{1}}{A}=\frac{{1}}{\frac{{e}}{2.71828}-2.71828* e^{{-1}}} &= 743325.622 \end{align} Now for 3 digits chopping : \begin{align} fl_c(\frac{{fl_c(e)}}{fl_c(2.71828)})=1=0.100*10 \end{align} \begin{align} fl_c(fl_c(2.71828)*fl_c(e^{{-1}}))=0.994 \end{align} \begin{align} fl_c(\frac{{fl_c(e)}}{fl_c(2.71828)}-fl_c(2.71828)*fl_c(e^{{-1}})=0.600*10^{{-2}}\end{align} \begin{align} fl_c(\frac{{1}}{A})=fl_c(\frac{{1}}{{0.600*10^{{-2}}}}) &= 166 \end{align} \begin{align} AE=|\frac{{1}}{A}-approximation\frac{{1}}{A}|=743159.622\end{align} My question is why there is so much difference between approximation and actual value? or I made a mistake somewhere?

tent123
  • 57
  • What is $fl_c?{}{}{}{}$ – Thomas Andrews Oct 18 '21 at 14:45
  • @Thomas Andrews $fl_c$ floating point numbers with chopping – tent123 Oct 18 '21 at 14:49
  • 1
    You lose significant digits whenever you subtract two numbers that are relatively close. For instance, if $x=1.23456$ to six significant figures, and $y=1.23457$ to six significant figures, then $x-y$ evaluates to $0.00001$ in six-digit arighmetic, so you are down to (at best) one significant figure of relative accuracy. See this Stack Overflow answer for an example of when the relative accuracy is even worse. – TonyK Oct 18 '21 at 14:52
  • “chopping” is also not a usual English math term, at least not one that I’ve encountered. Does it mean digit truncation? – Thomas Andrews Oct 18 '21 at 14:58
  • @Thomas Andrews Numerical Analysis, Richard L. Burden & J. Douglas Faires ,the word has been used in the book'Chopping and Rounding' – tent123 Oct 18 '21 at 15:03
  • 1
    You still haven’t defined the term. If you can’t define it, how can you use it? – Thomas Andrews Oct 18 '21 at 15:04
  • @Thomas Andrews oh sorry I know what is it , you are right , it means that digit truncation – tent123 Oct 18 '21 at 15:08
  • Sorry tent, I can't make sense of that at all – TonyK Oct 18 '21 at 16:04
  • @TonyK I mean that when I use three-digit rounding arithmetic to evaluate, Approximation is zero. So absolute error and relative error undefined for $\frac{{1}}{A}$ – tent123 Oct 19 '21 at 00:00

0 Answers0