Hello all,

I stumbled onto something weird while doing modular arithmetic: say you do 
in Sage 8.0

a = Zmod(6)(4)
pow(a, 1, k)

the result is always a itself, which prints as 4.

However,

a**1 % k

gives what I would expect (perform reduction when k divides 6, raises an 
error when it doesn't) – and the doc says that pow(a, b, c) should be 
equivalent to a**b % c.

I find pow's silent behavior quite unsettling, is there some good reason 
that I'm missing to implement it that way?

Have a very nice day,

  Gabriel Chênevert

-- 
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