Another accuracy comparison of q1.cpp and q2.cpp. q2.cpp produces a much better approximation to a root when the numerator of the usual quadratic formula is near zero. -------------------------------------------------------------- Below, q1 and q2 are both asked to find roots of the same polynomial, whose coefficients are a= 0.123e-4, b= 0.321e4, and c=0.485e-4 Both answers for the large negative root are the same to (at least) 11 digits. The answer provided by q2 for the small negative root is much more accurate than that produced by q1. It therefore produces a much smaller value of the polynomial, as expected. The relevant data are underlined with "=". -------------------------------------------------------------- kiwi.22> q1 For a quadratic polynomial of the form a*x*x + b*x + c, Enter the real, floating-point coefficients a, b, c: 0.123e-4 0.321e4 0.485e-4 The real roots are: -1.8485664670e-08, -2.6097560976e+08 ================= kiwi.39> eval For a quadratic polynomial of the form a*x*x + b*x + c, Enter the real, floating-point coefficients a, b, c: 0.123e-4 0.321e4 0.485e-4 Enter a point at which to evaluate: -1.8485664670e-08 The value of the polynomial at -1.84857e-08 is -1.0839e-05 =========== kiwi.24> q2 For a quadratic polynomial of the form a*x*x + b*x + c, Enter the real, floating-point coefficients a, b, c: 0.123e-4 0.321e4 0.485e-4 The real roots are: -1.5109034268e-08, -2.6097560976e+08 ================== kiwi.40> eval For a quadratic polynomial of the form a*x*x + b*x + c, Enter the real, floating-point coefficients a, b, c: 0.123e-4 0.321e4 0.485e-4 Enter a point at which to evaluate: -1.5109034268e-08 The value of the polynomial at -1.5109e-08 is -2.80002e-16 ============