-
Notifications
You must be signed in to change notification settings - Fork 275
Open
Labels
Description
Is your feature request related to a problem? Please describe.
fmpz_tdiv_r is useful in the implementation of the % operator in some languages for a wrapping type of fmpz.
fmpz_cdiv_r may be useful in some other cases.
GMP does implement the corresponding mpz_tdiv_r and mpz_cdiv_r functions.
Describe the solution you'd like
Add these functions.
Describe alternatives you've considered
I can also use fmpz_tdiv_qr or fmpz_cdiv_qr and ignore the quotient, or make a conditional subtraction after mpz_fdiv_r. I'm not sure if these are suboptimal compared with directly calling mpz_t(c)div_r.
Additional context