Roots of a quadratic function: Difference between revisions
m
→{{header|Modula-3}}: was wrong
m (→{{header|Icon}} and {{header|Unicon}}: was wrong) |
m (→{{header|Modula-3}}: was wrong) |
||
Line 1,479:
BEGIN
IF b < 0.0D0 THEN
x := (-b + sd) / (2.0D0 * a);
RETURN Roots{x, c / (a * x)};
ELSE
x := (-b - sd) / (2.0D0 * a);
RETURN Roots{c / (a * x), x};
END;
|