require 'cmath'

def quadratic(a, b, c)
  sqrt_discriminant = CMath.sqrt(b**2 - 4*a*c)
  [(-b + sqrt_discriminant) / (2.0*a), (-b - sqrt_discriminant) / (2.0*a)]
end

p quadratic(3, 4, 4/3.0)  
p quadratic(3, 2, -1)     
p quadratic(3, 2,  1)     
p quadratic(1, 0,  1)     
p quadratic(1, -1e6, 1)   
p quadratic(-2,  7, 15)   
p quadratic(1, -2,  1)    
p quadratic(1,  3,  3)