docs: def add(self, p, q):
          """
          perform elliptic curve addition
          """
          if p.iszero():
              return q
          if q.iszero():
              return p
  
          lft = 0
          # calculate the slope of the intersection line
          if p == q:
              if p.y == 0:
                  return self.zero()
              lft = (3 * p.x ** 2 + self.a) / (2 * p.y)
          elif p.x == q.x:
              return self.zero()
          else:
              lft = (p.y - q.y) / (p.x - q.x)
  
          # calculate the intersection point
          x = lft ** 2 - (p.x + q.x)
          y = lft * (p.x - x) - p.y
          return self.point(x, y)