% Script file: Quad1 % Better form of quadratic equation solutions to % prevent "loss of significance" or "catastrophic cancellation" % % a*x^2 + b*x + c = 0 % a=1, c=1, b=-10^10 root1 = (-b + sqrt(b^2-4*a*c))/2/a root2 = (-b - sqrt(b^2-4*a*c))/2/a