def calc x
      y = 0
      [@coef.size].max.times do |coef|
        y += @coef[coef] * x**coef
      end
      return y
    end
def calc x
      y = 0
      [@coef.size].max.times do |coef|
        y += @coef[coef] * x**coef
      end
      return y
    end
Calculate the value of f(x) from x