Skip to main content

Numerical Methods · Floating-point arithmetic, conditioning, and stability

In four-digit decimal floating-point arithmetic with rounding to nearest, compute…

Problem

In four-digit decimal floating-point arithmetic with rounding to nearest, compute \(\mathrm{fl}(a+b)\) and \(\mathrm{fl}(a \times b)\) for \(a = 0.2345 \times 10^{4}\) and \(b = 0.7654 \times 10^{0}\). Then compute the absolute and relative errors of each result relative to the exact \(a+b\) and \(a \times b\). Finally, determine whether \(\mathrm{fl}(a+b)\) equals the exact sum rounded to four significant digits, and explain any discrepancy using the definition of a floating-point significand of length 4.

Hint

Convert to ordinary decimals, form the exact sum and product, then round each to four significant digits.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

Create a free account to check your answer and see the solution. Create a free account.

More Numerical Methods practice problems

Back to Numerical Methods

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.