Worked example

a: 1
b: -5
c: 6
x² − 5x + 6 = (x − 2)(x − 3) = 0

→ x₁ = 3; x₂ = 2

Method and scope

Solve ax²+bx+c=0. Coefficients are scaled to reduce overflow; the stable q formula reduces cancellation. Δ is displayed relative to the squared scale. a=0 gives a linear equation; ∞ means identity, ∅ no solution.

Δ=b²−4ac; q=−½(b+sign(b)√Δ); x₁=q/a, x₂=c/q

Sources