def METHOD_NAME(x):
    try:
        # Requires https://github.com/pytorch/pytorch/issues/31945
        return torch.logerfc(x)
    except AttributeError:
        return x.double().erfc().log().to(dtype=x.dtype)