import mpmath


def cdf(x, k, theta):
    """
    Cumulative distribution function of the log-gamma distribution.

    k is the shape parameter of the gamma distribution.
    theta is the scale parameter of the log-gamma distribution.
    """
    with mpmath.extradps(5):
        x = mpmath.mpf(x)
        k = mpmath.mpf(k)
        theta = mpmath.mpf(theta)
        z = x/theta
        return mpmath.gammainc(k, 0, mpmath.exp(z), regularized=True)