Return ``x``.

    As usual, the result is rounded to the current context.  The ``pos``
    function can be useful for rounding an intermediate result, computed with a
    temporary increase in precision, back to the current context.  For
    example::

        >>> from bigfloat import precision
        >>> pow(3, 20) + 1.234 - pow(3, 20)  # inaccurate due to precision loss
        BigFloat.exact('1.2340002059936523', precision=53)
        >>> with precision(100):  # compute result with extra precision
        ...     x = pow(3, 20) + 1.234 - pow(3, 20)
        ...
        >>> x
        BigFloat.exact('1.2339999999999999857891452847980', precision=100)
        >>> pos(x)  # round back to original precision
        BigFloat.exact('1.2340000000000000', precision=53)

def pos(x, context=None):
    """
    Return ``x``.

    As usual, the result is rounded to the current context.  The ``pos``
    function can be useful for rounding an intermediate result, computed with a
    temporary increase in precision, back to the current context.  For
    example::

        >>> from bigfloat import precision
        >>> pow(3, 20) + 1.234 - pow(3, 20)  # inaccurate due to precision loss
        BigFloat.exact('1.2340002059936523', precision=53)
        >>> with precision(100):  # compute result with extra precision
        ...     x = pow(3, 20) + 1.234 - pow(3, 20)
        ...
        >>> x
        BigFloat.exact('1.2339999999999999857891452847980', precision=100)
        >>> pos(x)  # round back to original precision
        BigFloat.exact('1.2340000000000000', precision=53)

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