code: def double(self):
          
  
          # X9.62 B.3:
  
          p = self.curve.p
          a = self.curve.a
  
          l_ = ((3 * self.x * self.x + a) * inverse_mod(2 * self.y, p)) % p
  
          x3 = (l_ * l_ - 2 * self.x) % p
          y3 = (l_ * (self.x - x3) - self.y) % p
  
          return PrimePoint(self.curve, x3, y3)
docs: :return:
              A PrimePoint object that is twice this point