   toString: ->
     parts = @digits?.reverse()?.dropWhile((d) -> d == 0)?.map (d) -> d.toString()
     if parts
-      sign = if @sign < 0 then '-' else ''
+      sign = if @isNeg() then '-' else ''
       rest = parts.rest()?.map (t) -> "#{zeroes[t.length..]}#{t}"
       sign + parts.first() + if rest? then rest.join '' else ''
     else

# 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..]


    bounce step s.take n >> 1

  sqrt__: ->
    if @isZero()
      asNum 0
    else if @isPos()
      new LongInt 1, sqrt @digits
    else
      throw new Error "expected a non-negative number, got #{this}"
