       namex = "#{name}__"
       operator name, (a, b) ->
         [x, y] = upcast a, b
-        NumberBase.downcast x[namex] y
+        downcast x[namex] y
 
   gcd__: (other) ->
     step = (a, b) -> if b.isPos() then -> step b, a.mod(b) else a

      [tp1, tp2] = [op1.constructor, op2.constructor]
      throw new Error "operands of types #{tp1} and #{tp2} not supported"

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

      else
        p

    downcast bounce step makeNum(1), makeNum(a), makeNum(b)

# ----

