wrapped determinant modulo small prime