'Verify that the result of a/b is correctly rounded, by
comparing it with a pure Python implementation of correctly
rounded division.  b should be nonzero.'

def check_truediv(self, a, b, skip_small=True):

    (a, b) = (long(a), long(b))
    if (skip_small and (max(abs(a), abs(b)) < (2 ** DBL_MANT_DIG))):
        return
    try:
        expected = repr(truediv(a, b))
    except OverflowError:
        expected = 'overflow'
    except ZeroDivisionError:
        expected = 'zerodivision'
    try:
        got = repr((a / b))
    except OverflowError:
        got = 'overflow'
    except ZeroDivisionError:
        got = 'zerodivision'
    self.assertEqual(expected, got, 'Incorrectly    rounded    division    {}/{}:    expected    {},    got    {}'.format(a, b, expected, got))
