 
   operator 'pow', (a, b) ->
     step = (p, r, s) ->
-      if s.sgn() > 0
-        if s.mod(2).sgn() > 0
+      if s.isPos()
+        if s.isOdd() > 0
           -> step p.times(r), r, s.minus 1
         else
           -> step p, r.times(r), s.div 2

# Here are the beginnings of the `LongInt` class.

class LongInt extends NumberBase
  constructor: (sign, @digits) -> @sign = if @digits? then sign else 0

  neg__: -> new LongInt -@sign, @digits

  abs__: -> new LongInt 1, @digits

  sgn__: -> @sign

  zeroes = BASE.toString()[1..]


  show -> num.sqrt 99980001
  show -> num.pow 2, 16
  show -> num.abs -12345
  show -> num.isZero 1
  show -> num.isZero 123456
  show -> num.isZero 0
  show -> num.isNeg 0
  show -> num.isNeg -45
  show -> num.isNeg -12345
  show -> num.isOdd -12345
