Professional Documents
Culture Documents
Taller 2
Taller 2
Taller 2
a)1011001
b)0.01011
c)110.01001
110.01001=6.28125
y= ( ( x−7 ) x+ 8 ) x −0.35
4.24) One common instance where subtractive cancellation occurs involves finding the roots of a
parabola, a x 2+ bx+ c , with the quadratic formula:
−b ± √ b2−4 ac
x=
2a
For cases where b 2 ≫ 4 ac , the difference in the numerator can be very small and roundoff errors
can occur. In such cases, an alternative formulation can be used to minimize subtractive
cancellation:
−2 c
x=
−b ± √ b2−4 ac
Use 5-digit arithmetic with chopping to determine the roots of the following equation with both
versions of the quadratic formula.
x 2−5000.002 x +10
−b ± √ b2−4 ac
Roots with x=
2a
X1= -0.00199 x2= -0.00199
Roots with
−2 c
x v=
−b ± √ b2−4 ac
X1v= -0.002 x2v= -5.000000000118234e+03