def sqrt(x, context=None):
    """
    Return the square root of ``x``.

    Return -0 if x is -0, to be consistent with the IEEE 754 standard.  Return
    NaN if x is negative.

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