 # @param {BigInteger} p 
 # @param {number} d
 # @return {number} p%d
-quickmod = (p, d) -> p.modInt(d)
+quickmod = (p, d) -> 
+  p.modInt(d)
 
 #--------------
 

# 
#  Originally:  Copyright (C) 1998 David Mazieres (dm@uun.org)
#

#=================================================================


  #-----------------------

  calcmods : () ->
    @p = @p.add nbv @inc
    @maxinc -= @inc unless @maxinc is -1
    @inc = 0
    @mods = ( quickmod(@p, sp) for sp in small_primes)

  #-----------------------

  decrement_mods_find_divisor : () ->
    for sp,i in small_primes
      while (@mods[i] + @inc >= sp)
        @mods[i] -= sp
        return true if @mods[i] + @inc is 0
    return false

  #-----------------------

