def ceil(x, context=None):
    """
    Return the next higher or equal integer to x.

    If the result is not exactly representable, it will be rounded according to
    the current context.  Note that the rounding step means that it's possible
    for the result to be smaller than ``x``.  For example::

        >>> x = 2**100 + 1
        >>> ceil(2**100 + 1) >= x
        False

    One way to be sure of getting a result that's greater than or equal to
    ``x`` is to use the ``RoundTowardPositive`` rounding mode::

        >>> with RoundTowardPositive:
        ...     x = 2**100 + 1
        ...     ceil(x) >= x
        ...
        True

    Similar comments apply to the :func:`floor`, :func:`round` and
    :func:`trunc` functions.

    .. note::

       This function corresponds to the MPFR function ``mpfr_rint_ceil``,
       not to ``mpfr_ceil``.

    """
    return _apply_function_in_current_context(
        BigFloat,
        mpfr.mpfr_rint_ceil,
        (BigFloat._implicit_convert(x),),
        context,
    )
def ceil ( x , context = None ) : return _apply_function_in_current_context ( BigFloat , mpfr . mpfr_rint_ceil , ( BigFloat . _implicit_convert ( x ) , ) , context , )
Return the next higher or equal integer to x.

    If the result is not exactly representable, it will be rounded according to
    the current context.  Note that the rounding step means that it's possible
    for the result to be smaller than ``x``.  For example::

        >>> x = 2**100 + 1
        >>> ceil(2**100 + 1) >= x
        False

    One way to be sure of getting a result that's greater than or equal to
    ``x`` is to use the ``RoundTowardPositive`` rounding mode::

        >>> with RoundTowardPositive:
        ...     x = 2**100 + 1
        ...     ceil(x) >= x
        ...
        True

    Similar comments apply to the :func:`floor`, :func:`round` and
    :func:`trunc` functions.

    .. note::

       This function corresponds to the MPFR function ``mpfr_rint_ceil``,
       not to ``mpfr_ceil``.