flint icon indicating copy to clipboard operation
flint copied to clipboard

Tiebreaking in fmpz_ndiv

Open fredrik-johansson opened this issue 7 months ago • 1 comments

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.

fredrik-johansson avatar May 16 '25 15:05 fredrik-johansson

I'm all for this.

albinahlback avatar May 16 '25 16:05 albinahlback