     else
       LongInt.fromNative(@val).times other
 
-  div__: (x) -> new CheckedInt Math.floor @val / x.val
+  idiv__: (x) -> new CheckedInt Math.floor @val / x.val
 
   mod__: (x) -> new CheckedInt @val % x.val
 

  isEven__: -> @denom.eq(1) and @numer.isEven()
  isOdd__:  -> @denom.eq(1) and @numer.isOdd()

  cmp__: (x) -> @minus__(x).numer.cmp 0

  plus__: (x) ->
    a = num.gcd @denom, x.denom
    s = num.div x.denom, a
    t = num.div @denom, a
    Fraction.normalized s.times(@numer).plus(t.times(x.numer)), s.times @denom

  minus__: (x) -> @plus__ x.neg__()

    num[name]          = (args...) -> f.call num, args...
    NumberBase::[name] = (args...) -> num[name] this, args...

  for name in ['cmp', 'plus', 'minus', 'times', 'div', 'idiv', 'mod', 'gcd']
    do (name) ->
      namex = "#{name}__"
      operator name, (a, b) ->
        [x, y] = upcast a, b
        downcast x[namex] y

  div__: (other) -> Fraction.normalized this, other

  gcd__: (other) ->
    step = (a, b) -> if b.isPos() then -> step b, a.mod(b) else a
