-
-
Notifications
You must be signed in to change notification settings - Fork 679
Open
Description
The current behavior of mod on Sage rationals is currently useless
sage: (2/3).mod(5)
0
sage: (2/3).mod(6)
0
And very different from what mod_ui does
sage: (2/3).mod_ui(5)
4
sage: (2/3).mod_ui(6)
Traceback (most recent call last):
...
ArithmeticError: The inverse of 3 modulo 6 is not defined.
This ticket stands for:
- changing the behavior of
modon rationals to be consistent to the currentmod_ui(and handle the potential overflow inmod_ui) - deprecate
mod_uiin favor ofmod
This change will make Sage compatible with PARI/GP Mod and maple mod.
Component: basic arithmetic
Issue created by migration from https://trac.sagemath.org/ticket/21748