inlines negative inverse modulo function