 
   downcast = (x) ->
     if x instanceof LongInt and x.cmp(BASE) < 0
-      new CheckedInt x.digits.first() * x.sign
+      if x.digits?
+        new CheckedInt x.digits.first() * x.sign
+      else
+        new CheckedInt 0
     else
       x
 

        seq.conj(digit, -> step(r_.rest(), s_.rest(), borrow))
      else
        s or r
    step r, s

  minus__: (x) ->
    if @sign != x.sign


  log ''
  show -> number(12345).times 100001
  show -> number(11111).times 9
  show -> number(111).div 37
  show -> number(111111).div 37
  show -> number(111111111).div 37
  show -> number(111111111).div 12345679

  log ''
  show -> number(111).mod 37
  show -> number(111112).mod 37
  show -> number(111111111).mod 12345679
