flint
flint copied to clipboard
Tiebreaking in fmpz_ndiv
Currently fmpz_ndiv_qr rounds the quotient towards zero in the event of a tie. It would arguably be more useful to round to the nearest even integer, since that is the more common convention for the nearest integer function. For example, this would allow more easily implementing nint(x) where x is a rational number.
I'm all for this.