import mpmath


def cdf(x, c, beta, scale):
    """
    Cumulative distribution function of the Gamma-Gompertz distribution.
    """
    with mpmath.extradps(5):
        if x < 0:
            return mpmath.mp.zero
        x = mpmath.mpf(x)
        beta = mpmath.mpf(beta)
        c = mpmath.mpf(c)
        scale = mpmath.mpf(scale)

        ex = mpmath.exp(x/scale)
        p = -mpmath.powm1(beta / (beta - 1 + ex), c)
        return p