SOLUTIONS MANUAL
,Solutions Manual for Chapter 1
1.1 Program:
Defining Constants
fraction = 0.2; %The decimal fraction to be converted to binary
digits = 16; % Number of binary digits in the binary number to be determined
binary(1:digits)=0; %The binary significand
Determining the binary significand
for i = 1:digits
base2power = (1/2)^i;
if (fraction >= base2power)
fraction = fraction - base2power;
binary(i) = 1;
else
binary(i) = 0;
end
end
16-digit binary significand for 0.7 is 0.1011 0011 0011 0011
16-digit binary significand for 0.2 is 0.0011 0011 0011 0011
1.2 (i) (a) 0. 0 0 0 1.
(b) 0. 1 0 1 0
(ii) 0. 1 0 1 1
(iii) 0.6875
(iv) relative error: 11.61%
1.3 (a) 1.1001 × 2110
(b) 1.010000000010101100000010000011000100100110111010011 × 2110
(c) 1.0000 × 2-110.
1
1.4 relative error using 6 significant digits is 0.2 or 20%. Instead by evaluating ,
x + 1 + x2
2
we get a relative error of -0.000203 or -0.0203%. The rearrangement reduced the error by 1000
times or 3 orders of magnitude!
1.5 The first expression gives us 7.1 and the second expression gives us 7.106. The second
expression produces a more accurate result. The loss of accuracy is due to the multiplication
,steps, where we lose information due to 4-digit rounding arithmetic. The first expression
involves 7 multiplication steps. The 2nd expression involves only 2 multiplication steps.
1.6 Absolute error is 0.0076. After summing the smallest terms first, and in the order of smallest
to largest numbers, maintaining 3-digit rounding, the absolute error is 0.0024. The first sum has
two significant digits and the second sum has three significant digits.
1.7 1. 74.9967, 0.0133
2. -100.009, -0.0001
1.8 same as above
1.9
ln (1 + x)
Terms included x = 0.5 x=2
1 0.5 2
2 0.375 0
3 0.41666667 8/3
4 0.40104167 -4/3
Relative error in estimating ln (1 + x)
Terms included x = 0.5 x=2
1 0.2332 0.8295
2 -0.0751 -1
3 0.02763 1.4273
4 -0.01091 -2.2136
For x = 0.5, the error monotonically decreases be factor greater than 2.
For x = 2, the error is increasing with increasing number of terms. This method of estimating ln
(1 + x) is inefficient for x = 2, or actually for x > 1 because the value of the x term increases with
increasing power. This produces a divergent series. We cannot use this series to estimate the
function for x = 2.
1.10 Demonstrated for x = 0.5. Sum of the series for 3 terms is 0.4794 using the relative error
criterion. In situations where we do not know the true answer, we may use the stopping criterion
(last term)/(summation of terms) < 0.001. In that case, for x = 0.5, 4 terms are required to
produce a solution 0.4794 that meets the criterion for convergence. The tolerance specification
for the 2nd criterion is at least as stringent as the 1st.
1.11 f '( 2) = 33. Estimation of first-order derivative using
forward difference: 37.584
backward difference: 28.876
central difference: 33.23
method absolute error relative error
forward difference 4.584 0.139
, backward difference 4.124 0.125
central difference 0.23 0.007
1.12 The range is from 56720 to 67150 or 0.9068 to 1.074 times the average. Only 4 significant
figures can be retained.
1.13 CD 34+ cells
Rolling velocities
2.399
2.817
0.815
2.321
0.972
2.670
1.368
1.985
3.276
1.357
Max: 3.276 absolute deviation = 1.278 relative deviation = 0.6396
Avg. 1.998
Min: 0.815 absolute deviation = 1.183
CD 34 – cells
Rolling velocities
2.134
2.672
4.386
2.680
2.755
2.091
2.567
2.616
2.032
2.897
Max: 4.386 absolute deviation = 1.703 relative deviation = 0.6347
Avg. 2.683
Min: 2.032 absolute deviation = 0.651
The average rolling velocities of CD 34- cancer cells is higher than that of CD 34+ cells by
0.685. We would need to perform statistical tests to identify if the differences are by chance or
actually signify differences in the respective populations.