docs: public Point twice() {
        if (this.isInfinity()) {
           // Twice identity element (point at infinity) is identity
           return this;
        }
  
        if (this._y.toBigInteger().signum() == 0) {
           // if y1 == 0, then (x1, y1) == (x1, -y1)
           // and hence this = -this and thus 2(x1, y1) == infinity
           return this._curve.getInfinity();
        }
  
        FieldElement TWO = this._curve.fromBigInteger(BigInteger.valueOf(2));
        FieldElement THREE = this._curve.fromBigInteger(BigInteger.valueOf(3));
        FieldElement gamma = this._x.square().multiply(THREE).add(_curve.getA()).divide(_y.multiply(TWO));
  
        FieldElement x3 = gamma.square().subtract(this._x.multiply(TWO));
        FieldElement y3 = gamma.multiply(this._x.subtract(x3)).subtract(this._y);
  
        return new Point(_curve, x3, y3, this._compressed);
     }