fixed indentation
undefined NDEBUG
undefined NDEBUG
new subroutine: inv_mod_pk()