@SuppressWarnings({"rawtypes", "unchecked"})
  @Override
  public U doub() {
    final FieldElement xSquared = x.power(2);
    final FieldElement m = xSquared.multiply(3).divide(y.multiply(2));
    final FieldElement mSquared = m.power(2);
    final FieldElement newX = mSquared.subtract(x.multiply(2));
    final FieldElement newY = m.negate().multiply(newX).add(m.multiply(x)).subtract(y);
    return newInstance(newX, newY);
  }
New instance of generic type U.

@param x the x
@param y the y
@return the U
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/altbn128/AbstractFieldPoint.java