Roots of a quadratic function: Difference between revisions

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(a1,b-1e9,c)=polrootsreal(Pol([a,b,c])1)</lang>
gives one root around 0.000000001000000000000000001 and one root around 999999999.999999999.
 
=={{header|Pascal}}==