 # Here are the beginnings of the `LongInt` class.
 
 class LongInt extends NumberBase
-  constructor: (sign, @digits) -> @sign = if @digits? then sign else 0
+  constructor: (sign, @digits) ->
+    @sign = if @digits? then sign else 0
+    @first = @digits?.first() or 0
 
   neg__: -> new LongInt -@sign, @digits
 
   abs__: -> new LongInt 1, @digits
 
   sgn__: -> @sign
+
+  isPos__: -> @sign > 0
+
+  isNeg__: -> @sign < 0
+
+  isZero__: -> @sign == 0
+
+  isEven__: -> @first % 2 == 0
+
+  isOdd__: -> @first % 2 != 0
 
   zeroes = BASE.toString()[1..]
 

  show -> num.sqrt 99980001
  show -> num.pow 2, 16
  show -> num.abs -12345


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