class_docstr: Point of Elliptic Curve
  
  Examples
  ========
  
  >>> from sympy.ntheory.elliptic_curve import EllipticCurve
  >>> e1 = EllipticCurve(-17, 16)
  >>> p1 = e1(0, -4, 1)
  >>> p2 = e1(1, 0)
  >>> p1 + p2
  (15, -56)
  >>> e3 = EllipticCurve(-1, 9)
  >>> e3(1, -3) * 3
  (664/169, 17811/2197)
  >>> (e3(1, -3) * 3).order()
  oo
  >>> e2 = EllipticCurve(-2, 0, 0, 1, 1)
  >>> p = e2(-1,1)
  >>> q = e2(0, -1)
  >>> p+q
  (4, 8)
  >>> p-q
  (1, 0)
  >>> 3*p-5*q
  (328/361, -2800/6859)
class_docstr_tok: ["Point","of","Elliptic","Curve","Examples","========",">",">",">","from","sympy.ntheory.elliptic_curve","import","EllipticCurve",">",">",">","e1","=","EllipticCurve","(","-17",",","16",")",">",">",">","p1","=","e1","(","0",",","-4",",","1",")",">",">",">","p2","=","e1","(","1",",","0",")",">",">",">","p1","+","p2","(","15",",","-56",")",">",">",">","e3","=","EllipticCurve","(","-1",",","9",")",">",">",">","e3","(","1",",","-3",")","*","3","(","664\/169",",","17811\/2197",")",">",">",">","(","e3","(","1",",","-3",")","*","3",")",".order","(",")","oo",">",">",">","e2","=","EllipticCurve","(","-2",",","0",",","0",",","1",",","1",")",">",">",">","p","=","e2","(","-1,1",")",">",">",">","q","=","e2","(","0",",","-1",")",">",">",">","p+q","(","4",",","8",")",">",">",">","p-q","(","1",",","0",")",">",">",">","3","*","p-5","*","q","(","328\/361",",","-2800\/6859",")"]
code: def __add__(self, p):
      if self.z == 0:
          return p
      if p.z == 0:
          return self
      x1, y1 = self.x / self.z, self.y / self.z
      x2, y2 = p.x / p.z, p.y / p.z
      a1 = self._curve._a1
      a2 = self._curve._a2
      a3 = self._curve._a3
      a4 = self._curve._a4
      a6 = self._curve._a6
      if x1 != x2:
          slope = (y1 - y2) / (x1 - x2)
          yint = (y1 * x2 - y2 * x1) / (x2 - x1)
      else:
          if (y1 + y2) == 0:
              return self.point_at_infinity(self._curve)
          slope = (3 * x1**2 + 2 * a2 * x1 + a4 - a1 * y1) / (
              a1 * x1 + a3 + 2 * y1
          )
          yint = (-(x1**3) + a4 * x1 + 2 * a6 - a3 * y1) / (
              a1 * x1 + a3 + 2 * y1
          )
      x3 = slope**2 + a1 * slope - a2 - x1 - x2
      y3 = -(slope + a1) * x3 - yint - a3
      return self._curve(x3, y3, 1)
  
imports: from sympy.core.numbers import oo
  from sympy.core.symbol import symbols
  from sympy.polys.domains import FiniteField, QQ, RationalField, FF
  from sympy.polys.polytools import Poly
  from sympy.solvers.solvers import solve
  from sympy.utilities.iterables import is_sequence
  from sympy.utilities.misc import as_int
  from .factor_ import divisors
  from .residue_ntheory import polynomial_congruence
label_desc: Use image node_id 3 for calling the EllipticCurvePoint obj's underlying member method code with example usage: obj.__add__(p) and returns: self, p, self, self