    # File lib/standard/facets/math/sqsolve.rb, line 35
      def self.sqsolve(a, b, c, d = 0.0)
        if a == 0.0
          x = linsolve(b, c, d)
          return x.nil? ? nil: [ linsolve(b, c, d) ]
        else
          return [0.0, linsolve(a, b)].sort if c == d
          if b == 0.0
            x = Extmath.linsolve(a, c, d)
            x < 0.0 ? nil : [-Math.sqrt(x), Math.sqrt(x)]
          else
            x = b * b + 4.0 * a * (d - c)
            return nil if x < 0.0
            x = b < 0 ? b - Math.sqrt(x) : b + Math.sqrt(x)
            [-0.5 * x / a, 2.0 * (d - c) / x].sort
          end
        end
      end