'Return a new point that is twice the old.'

def double(self):

    if (self == INFINITY):
        return INFINITY
    p = self.__curve.p()
    a = self.__curve.a()
    l = (((((3 * self.__x) * self.__x) + a) * numbertheory.inverse_mod((2 * self.__y), p)) % p)
    x3 = (((l * l) - (2 * self.__x)) % p)
    y3 = (((l * (self.__x - x3)) - self.__y) % p)
    return Point(self.__curve, x3, y3)
