def multiply_by_scalar(i)
      raise ArgumentError, 'Scalar is not an integer.' if !i.is_a?(Integer)
      raise ArgumentError, 'Scalar is negative.' if i < 0
      result = group.infinity
      v = self
      while i > 0
        result = result.add_to_point(v) if i.odd?
        v = v.double
        i >>= 1
      end
      result
    end
def multiply_by_scalar(i)
      raise ArgumentError, 'Scalar is not an integer.' if !i.is_a?(Integer)
      raise ArgumentError, 'Scalar is negative.' if i < 0
      result = group.infinity
      v = self
      while i > 0
        result = result.add_to_point(v) if i.odd?
        v = v.double
        i >>= 1
      end
      result
    end
Returns the point multiplied by a non-negative integer.

 @param i (Integer)
 @return (Point)