   check num(7), -> num(98).gcd 21
   check num(7), -> num(77777).gcd 21
 
-  a = null
   check num(8192),  -> a = num Math.pow 2, 13
   check num(8194),  -> a.plus 2
   check num(8192),  -> a.times 1

          throw new Error "Expected #{seen} to be #{expected}."
        expect(classof seen).toEqual classof expected

  check 0, -> num(0).sgn()
  check 0, -> num(0).cmp(0)


  check num('123456789000006789'), -> a.plus -123450000
  check num(0),                    -> a.minus a


  check num('-999999994999'), -> a = num -1e12 + 5001
  check num('5001'),          -> b = num 5001
  check num('999999995000'),  -> c = num 1e12 - 5000

  check '-999999994999', -> a.toString()
  check -1e12 + 5001,    -> a.toNative()
  check '999999995000',  -> c.toString()
  check 1e12 - 5000,     -> c.toNative()

  check true,  -> a.cmp(b) < 0
  check true,  -> a.lt b
  check true,  -> a.lt b.neg()
  check false, -> a.gt b
  check true,  -> a.neg().gt b

  check '-999999989998',    -> a.plus(b).toString()
  check num(-1e12 + 10002), -> a.plus b
  check '-1000000000000',   -> a.minus(b).toString()
  check num(-1e12),         -> a.minus b
  check '1000000000000',    -> b.minus(a).toString()
  check num(1e12),          -> b.minus a
  check '0',                -> a.minus(a).toString()
  check num(0),             -> a.minus a
  check '1',                -> a.plus(c).toString()
  check num(1),             -> a.plus c

  check '999999989998000025010001',
                            -> a.times(a).toString()
  check '999999979996000150060005499699940621500150020001',
                            -> (a.times a).times(a.times a).toString()

  check c,                   -> c.pow(3).idiv(c.times(c))
  check num(0),              -> c.pow(3).mod(c.times(c))
  check c,                   -> c.pow(3).plus(1).idiv(c.times(c))
  check num(1),              -> c.pow(3).plus(1).mod(c.times(c))
  check c.minus(1),          -> c.pow(3).minus(1).idiv(c.times(c))
  check c.times(c).minus(1), -> c.pow(3).minus(1).mod(c.times(c))
