#include namespace RAT { bool QuadraticRoots(double a,double b,double c,double& x1,double& x2) { double rootarg = b*b - 4.*a*c; if(rootarg<0.) { x1 = 0.; x2 = 0.; return false; } double sign = (b >= 0) ? 1. : -1.; double q = -0.5*( b + sign*sqrt(rootarg) ); x1 = q/a; x2 = c/q; return true; } } // namespace RAT