Return max(x - y, 0).

    Return x - y if x > y, +0 if x <= y, and NaN if either x or y is NaN.

def dim(x, y, context=None):
    """
    Return max(x - y, 0).

    Return x - y if x > y, +0 if x <= y, and NaN if either x or y is NaN.

    """
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_dim,
        (
            BigFloat._implicit_convert(x),
            BigFloat._implicit_convert(y),
        ),
        context,
    )