docstr: 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.
docstr_tok: ["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","."]
code: def check_truediv(self, a, b, skip_small=True):
      """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."""
  
      # skip check for small a and b: in this case, the current
      # implementation converts the arguments to float directly and
      # then applies a float division.  This can give doubly-rounded
      # results on x87-using machines (particularly 32-bit Linux).
      if skip_small and max(abs(a), abs(b)) < 2**DBL_MANT_DIG:
          return
  
      try:
          # use repr so that we can distinguish between -0.0 and 0.0
          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),
      )
  
imports: import unittest
  from test import support
  import sys
  import random
  import math
  import array
label_desc: Use image node_id 25 for calling the LongTest obj's underlying member method code with example usage: obj.check_truediv(a, b, skip_small) without return types