1

Searching for some help with the following questions:

Given the $3$ numbers $0.1329, 1.543, 23.21$,

$1$ ) Add the $3$ numbers in both ascending and descending order rounding all calculations to $4$ digits.

My workings: I am a little confused with the ascending and descending order, wouldn't these two calculations be equivalent?

Ascending $0.1329+1.543+23.21 = 24.89$
Descending $23.21 + 1.543+ 0.1329 = 24.89$

$2$) Compute the relative errors:

What relative errors do i need to calculate? if i was to calculate the erors for each number individiually wouldnt they be $0$ since they lost no accucary when rounded to 4 digits.

$3$) Which is more accurate and why?

jh123
  • 1,400

1 Answers1

1

Your second sum is wrong (you forgot to round to $4$ digits): $23.21 + 1.543 = 24.753 \rightarrow 24.75$ and $24.75 + 0.1329 = 24.8829 \rightarrow 24.88.$

This intermediate round is the reason why the order of summation may give different results.

The true sum is $s=24.8859.$ Compute the relative error: Ascending $(s-24.89)/s = -0.00016475$ and decending $(s-24.88)/s = 0.000237082.$

Therefore the ascending sum is more accurate.

gammatester
  • 18,827
  • should the relative errors be done in absolute values? making them both positive? – jh123 Sep 20 '18 at 20:47
  • and I didn't know you had to add one to another then add that sum to the final number you needed to add, that's where I was going wrong in my calculation. Thanks for pointing that out! – jh123 Sep 20 '18 at 20:48
  • 1
    If not otherwise stated, I would use signed relative errors. If you use signed errors you compare the magnitude to get the smaller one. – gammatester Sep 20 '18 at 20:50