Defined in pspglb.web .
This function tries to find the solutions S_0 and S_1 to the
quadratic equation
ax^2 + bx + c according to the formulae
S_0 == -b + sqrt(b^2 - 4ac) / 2a) and
S_1 == -b - sqrt( b^2 - 4ac) / 2a.
Let r stand for the return value. If S_0 cannot be found,
r.first will be INVALID_REAL , otherwise S_0.
If S_1 cannot be found,
r.second will be INVALID_REAL , otherwise S_1.
(x + 4)(x + 2) = x^2 + 6x + 8 = 0
real_pair r = solve_quadratic(1, 6, 8);
=> r.first == -2
=> r.second == -4
real_pair r = solve_quadratic(1, -2, 4);
=> r.first == INVALID_REAL
=> r.second == INVALID_REAL
|