def equal ( x , y ) : x = BigFloat . _implicit_convert ( x ) y = BigFloat . _implicit_convert ( y ) return mpfr . mpfr_equal_p ( x , y )
python check 2 float is equal
Return True if x == y and False otherwise .
def equal(x, y):
    """
    Return True if x == y and False otherwise.

    This function returns False whenever x and/or y is a NaN.

    """
    x = BigFloat._implicit_convert(x)
    y = BigFloat._implicit_convert(y)
    return mpfr.mpfr_equal_p(x, y)