if (this.isInfinity()) { if (b.isInfinity()) { return new ECPoint.Fp(this.curve, null, null, this.withCompression); } return new ECPoint.Fp(b.getCurve(), b.getX(), b.getY(), this.withCompression); }  if (b.isInfinity()) { return new ECPoint.F2m(this.curve, this.x, this.y, this.withCompression); }   if (this.x.equals(b.x)) { if (this.y.equals(b.x)) {  return this.twice(); } else {  return new ECPoint.Fp(this.curve, null, null, this.withCompression); } }
        public ECPoint add(ECPoint b)        {            ECFieldElement gamma = b.y.subtract(this.y).divide(b.x.subtract(this.x));            ECFieldElement x3 = gamma.multiply(gamma).subtract(this.x).subtract(b.x);            ECFieldElement y3 = gamma.multiply(this.x.subtract(x3)).subtract(this.y);            return new ECPoint.Fp(curve, x3, y3);        }