   div__: (x) -> new CheckedInt Math.floor @val / x.val
 
   mod__: (x) -> new CheckedInt @val % x.val
-
-  gcd: (other) ->
-    step = (a, b) -> if b > 0 then -> step b, a % b else a
-
-    [a, b] = [Math.abs(@val), Math.abs(getval other)]
-    new CheckedInt if a > b then trampoline step a, b else trampoline step b, a
 
   toString: -> "" + @val
 

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

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


# ----



  log ''
  show -> number(98).gcd 21
  show -> number(77777).gcd 21

  log ''
  show -> a = number Math.pow 2, 13
