Hello,

In #21745 the behavior of (p/q) % n is proposed for a change. However
the current behavior (that is looking at the operation p * q^-1 modulo
n) is something useful that we want to keep. I would like to add a
method to rational numbers with this behavior, in other words
something equivalent to

def my_method(self, n):
    return (self.numerator() * self.denominator().inverse_mod(n)) % n

or

def my_method_bis(self, n):
    return Zmod(n)(self).lift()

Of course it is possible to optimize the implementation but I am
currently looking for a relevant name. Any suggestion?

Cheers,
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to