#15709: silent conversion of mod to int
----------------------------+------------------------
Reporter: ppurka | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.1
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+------------------------
Comment (by nbruin):
Replying to [comment:1 ppurka]:
> Actually, I don't see what is the problem with the output. `2*a = 0 mod
2`, so `i^0` is 1. And `i^2 = -1`, so the outputs seem correct. Was the OP
expecting an error from taking the power?
I think his issue is with the last entry, `i^(2*a)==1`. I think he
expected an error because the exponent is in `Z/2Z` and not in `Z/4Z`.
It would indeed be nicer if sage would refuse to let `Z/nZ` act on the
right on rings by exponentiation. It's not well-defined, unless you're
looking at an `d`-th root of unity, where `d` is a divisor of `n`.
--
Ticket URL: <http://trac.sagemath.org/ticket/15709#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.