In gsl_poly_solve_quadratic(), you could replace the complicated:
if (b == 0)
{
double r = fabs (0.5 * sqrt (disc) / a);
*x0 = -r;
*x1 = r;
}
with the simpler:
if (b == 0)
{
double r = sqrt (-c / a);
*x0 = -r;
*x1 = r;
}
you could also move the assignment of disc after the linear case,
disc = b * b - 4 * a * c;
since disc is not used in the linear case.
Best wishes,
Jim Ward
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl