class_docstr: This class implements rational numbers.
  
  In the two-argument form of the constructor, Fraction(8, 6) will
  produce a rational number equivalent to 4/3. Both arguments must
  be Rational. The numerator defaults to 0 and the denominator
  defaults to 1 so that Fraction(3) == 3 and Fraction() == 0.
  
  Fractions can also be constructed from:
  
    - numeric strings similar to those accepted by the
      float constructor (for example, '-2.3' or '1e10')
  
    - strings of the form '123/456'
  
    - float and Decimal instances
  
    - other Rational instances (including integers)
class_docstr_tok: ["This","class","implements","rational","numbers",".","In","the","two-argument","form","of","the","constructor",",","Fraction","(","8",",","6",")","will","produce","a","rational","number","equivalent","to","4\/3",".","Both","arguments","must","be","Rational",".","The","numerator","defaults","to","0","and","the","denominator","defaults","to","1","so","that","Fraction","(","3",")","==","3","and","Fraction","(",")","==","0",".","Fractions","can","also","be","constructed","from",":","-","numeric","strings","similar","to","those","accepted","by","the","float","constructor","(","for","example",",","'-2.3","'","or","'1e10","'",")","-","strings","of","the","form","'123\/456'","-","float","and","Decimal","instances","-","other","Rational","instances","(","including","integers",")"]
docstr: a / b
docstr_tok: ["a","\/","b"]
code: def _div(a, b):
      """a / b"""
      # Same as _mul(), with inversed b.
      na, da = a.numerator, a.denominator
      nb, db = b.numerator, b.denominator
      g1 = math.gcd(na, nb)
      if g1 > 1:
          na //= g1
          nb //= g1
      g2 = math.gcd(db, da)
      if g2 > 1:
          da //= g2
          db //= g2
      n, d = na * db, nb * da
      if d < 0:
          n, d = -n, -d
      return Fraction(n, d, _normalize=False)
  
imports: from decimal import Decimal
  import math
  import numbers
  import operator
  import re
  import sys
label_desc: Use image node_id 14 for calling the Fraction obj's underlying member method code with example usage: obj._div(a, b) and returns: Fraction