code: def quadraticSolver(a, b, c):
      
      if a == 0:
          if b == 0:  return [] # attempting to solve an equation with infinite (0=0) or impossible (0=3) solutions for x
          else:       return [-c / float(b)]
      else:
          d = b**2.0 - 4*a*c # calculate the discriminant
          if d < 0:   return [] # would require math.sqrt a negative number, yielding a complex number
          solvedPart0 = 1/(2.0*a)
          solvedPart1 = -b * solvedPart0
          if d == 0:  return [ solvedPart1 ] # two values at same 'x'
          else: # i.e. d > 0   apply full quadratic formula
              solvedPart2 = math.sqrt(d)*solvedPart0
              return [ solvedPart1+solvedPart2, solvedPart1-solvedPart2 ]
docs: return solution(s) for x, to the quadratic equation a*x^2 + b*x + c
      when it equals zero using the quadratic formula