MPZ related comparions
======================

    >>> import gmpy2 as G
    >>> from gmpy2 import mpz, mpq, mpfr
    >>> a = mpz(123)
    >>> b = mpz(456)

Test comparisons
----------------

    >>> c=G.mpz(a)
    >>> a
    mpz(123)
    >>> b
    mpz(456)
    >>> c is a
    True
    >>> c==a
    True
    >>> c>a
    False
    >>> c<a
    False
    >>> a>b
    False
    >>> a<b
    True
    >>> not G.mpz(0)
    True
    >>> not a
    False
    >>> G.mpz(1) == None
    False
    >>> G.mpz(1) == '1'
    False
    >>> G.mpz(1) == 'abc'
    False
    >>> [G.mpz(23), None].count(None)
    1

Test comparisons with NaN/Inf
-----------------------------

Note: Tests involving mpfr should be moved to another file.

    >>> G.context().trap_divzero == False
    True
    >>> a == float('Inf')
    False
    >>> a != float('Inf')
    True
    >>> a > float('Inf')
    False
    >>> a >= float('Inf')
    False
    >>> a < float('Inf')
    True
    >>> a <= float('Inf')
    True
    >>> a == float('-Inf')
    False
    >>> a != float('-Inf')
    True
    >>> a > float('-Inf')
    True
    >>> a >= float('-Inf')
    True
    >>> a < float('-Inf')
    False
    >>> a <= float('-Inf')
    False
    >>> a == float('nan')
    False
    >>> a != float('nan')
    True
    >>> a > float('nan')
    False
    >>> a >= float('nan')
    False
    >>> a < float('nan')
    False
    >>> a <= float('nan')
    False
    >>> float('Inf') == a
    False
    >>> float('Inf') != a
    True
    >>> float('Inf') > a
    True
    >>> float('Inf') >= a
    True
    >>> float('Inf') < a
    False
    >>> float('Inf') <= a
    False
    >>> float('-Inf') == a
    False
    >>> float('-Inf') != a
    True
    >>> float('-Inf') > a
    False
    >>> float('-Inf') >= a
    False
    >>> float('-Inf') < a
    True
    >>> float('-Inf') <= a
    True
    >>> float('nan') == a
    False
    >>> float('nan') != a
    True
    >>> float('nan') > a
    False
    >>> float('nan') >= a
    False
    >>> float('nan') < a
    False
    >>> float('nan') <= a
    False


    >>> a == mpfr('Inf')
    False
    >>> a != mpfr('Inf')
    True
    >>> a > mpfr('Inf')
    False
    >>> a >= mpfr('Inf')
    False
    >>> a < mpfr('Inf')
    True
    >>> a <= mpfr('Inf')
    True
    >>> a == mpfr('-Inf')
    False
    >>> a != mpfr('-Inf')
    True
    >>> a > mpfr('-Inf')
    True
    >>> a >= mpfr('-Inf')
    True
    >>> a < mpfr('-Inf')
    False
    >>> a <= mpfr('-Inf')
    False
    >>> a == mpfr('nan')
    False
    >>> a != mpfr('nan')
    True
    >>> a > mpfr('nan')
    False
    >>> a >= mpfr('nan')
    False
    >>> a < mpfr('nan')
    False
    >>> a <= mpfr('nan')
    False
    >>> mpfr('Inf') == a
    False
    >>> mpfr('Inf') != a
    True
    >>> mpfr('Inf') > a
    True
    >>> mpfr('Inf') >= a
    True
    >>> mpfr('Inf') < a
    False
    >>> mpfr('Inf') <= a
    False
    >>> mpfr('-Inf') == a
    False
    >>> mpfr('-Inf') != a
    True
    >>> mpfr('-Inf') > a
    False
    >>> mpfr('-Inf') >= a
    False
    >>> mpfr('-Inf') < a
    True
    >>> mpfr('-Inf') <= a
    True
    >>> mpfr('nan') == a
    False
    >>> mpfr('nan') != a
    True
    >>> mpfr('nan') > a
    False
    >>> mpfr('nan') >= a
    False
    >>> mpfr('nan') < a
    False
    >>> mpfr('nan') <= a
    False

