       else if t
         -> step(seq.conj(0, -> q), seq.conj(t.first(), -> h), t.rest())
       else
-        [cleanup(q), h && div(h, seq [scale])]
+        [cleanup(q), h && idiv(h, seq [scale])]
 
     bounce step null, null, r_?.reverse()
 
-  div = (r, s) -> divmod(r, s)[0]
-
-  mod = (r, s) -> divmod(r, s)[1]
-
-  div__: (x) ->
+  idiv = (r, s) -> idivmod(r, s)[0]
+
+  mod = (r, s) -> idivmod(r, s)[1]
+
+  idiv__: (x) ->
     d = cmp @digits, x.digits
     if d < 0
       asNum 0
     else if d == 0
       asNum @sign * x.sign
     else
-      new LongInt @sign * x.sign, div @digits, x.digits
+      new LongInt @sign * x.sign, idiv @digits, x.digits
 
   mod__: (x) ->
     d = cmp @digits, x.digits


  cleanup = (s) -> s?.reverse()?.dropWhile((x) -> x == 0)?.reverse() or null

  sqrt = (s) ->
    n = s.size()
    step = (r) ->
      rn = seq div(add(r, div(s, r)), seq([2]))
      if cmp(r, rn) then -> step(rn) else rn
    bounce step s.take n >> 1

  sqrt__: ->
    if @isZero()
      asNum 0
    else if @isPos()
      new LongInt 1, sqrt @digits
    else
      throw new Error "expected a non-negative number, got #{this}"


  show -> num.gt 65537, num.pow 2, 16

  log ''
  show -> num.div 2, 3
  show -> num.div(9,10).times(num.div(5,21))
  show -> num.div(3,5).minus(num.div(7,11))
  show -> num.div 111111111, 12345679 * 2
  show -> num.div(28,3).isqrt()
