Anonymous user
Roots of a quadratic function: Difference between revisions
→{{header|PARI/GP}}
Line 1,452:
=={{header|PARI/GP}}==
{{works with|PARI/GP|2.8.0+}}▼
<lang parigp>roots(a,b,c)=polrootsreal(Pol([a,b,c]))</lang>
{{trans|C}}
Otherwise, coding directly:
<lang parigp>roots(a,b,c)={
b /= a;
Line 1,465 ⟶ 1,469:
};</lang>
Either way,
▲{{works with|PARI/GP|2.8.0+}}
<lang parigp>roots(
gives one root around 0.000000001000000000000000001 and one root around 999999999.999999999.
=={{header|Pascal}}==
|