% Cancelation in quadratic formula % % ax^2+bx+c=0 % % x=(-b\pm \sqrt{b^2-4ac})/2a % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % pick roots and coefficient a format long x1=1 x2=-0.000000000001 a=1 % a(x-x1)(x-x2) = ax^2-a(x1+x2)x+x1*x2, so b=-a*(x1+x2) c=x1*x2 % we can get our roots back from the qudratic formula: r1=(-b+sqrt(b^2-4*a*c))/(2*a) r2=(-b-sqrt(b^2-4*a*c))/(2*a) % works fine! at least for this choice of coefficients % % % try to do the same for X1=1 and X2=-100000000000