A microcontroller corrects a temperature reading by the cubic p(x)=a_3x^3+a_2x^2+a_1x+a_0

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics

Error, Chance and the Machine, Ch Rounding, backward error and the sensitivity of a computation

Problem

A microcontroller corrects a temperature reading by the cubic p(x)=a3x3+a2x2+a1x+a0,p(x)=a_3x^3+a_2x^2+a_1x+a_0, where xx is a normalised sensor reading (dimensionless) and pp is in kelvin. It evaluates pp in binary32 by Horner's rule: b2=a3x+a2b_2=a_3x+a_2, then b1=b2x+a1b_1=b_2x+a_1, then b0=b1x+a0b_0=b_1x+a_0, and b0b_0 is the computed p^\hat p. Each of the six multiplications and additions is rounded separately, as in the rounding model. Treat the stored aka_k and xx as exact, and work to first order in uu. In part (c), take the printed decimals as the stored values and leave out the error of storing them in binary32. ((a)) Write each of the six operations as its exact result times (1+δj)(1+\delta_j), with ∣δj∣≤u|\delta_j|\le u. Show that p^=∑k=03ak(1+θk)xk\hat p=\sum_{k=0}^{3}a_k(1+\theta_k)x^k, and find a bound on ∣θk∣|\theta_k| for each kk. ((b)) Use part (a) to state the backward error η\eta of this evaluation, defined as for a polynomial in the chapter with ∣Δak∣≤η∣ak∣|\Delta a_k|\le\eta|a_k|, as a bound in binary32 (t=24t=24). ((c)) Take a3=−0.12 Ka_3=-0.12\ \mathrm{K}, a2=1.1 Ka_2=1.1\ \mathrm{K}, a1=−2.6 Ka_1=-2.6\ \mathrm{K}, a0=1.5 Ka_0=1.5\ \mathrm{K} and x=3.0x=3.0. Use η\eta to bound the absolute and the relative error of the computed p^\hat p. ((d)) The relative bound of part (c) is many times larger than η\eta. Find the factor, and say whether the algorithm or the problem is responsible.

Browse the problem library