Made a quick quadratic program in c with exact values, accounting for imaginary roots.