implement standard functions
implement some more functions for mpz
document helper macros