#15709: silent conversion of mod to int
------------------------+----------------------------
   Reporter:  ppurka    |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-6.1
  Component:  coercion  |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 From the [https://spreadsheets.google.com/pub?key=pCwvGVwSMxTzT6E2xNdo5fA
 google notebook bug reports]
 {{{
 # I lost several hours because Sage silently converted a number defined
 mod n to an integer
 # when it appeared as an exponent.
 # I was working in a different cyclotomic field, but the problem is right
 here in the complex numbers.
 # I believe I should have to explicitly convert to an integer unless the
 answer only depends on the value mod n.
 a=Mod(3,2)
 print type(a),a,2*a,(i^2)^a,i^(2*a)

 Output:
 <type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'> 1 0 -1 1
 }}}

 ''This must surely have been discussed before. I would have tried to look
 up the discussion if I thought there was any hope that someone could
 convince me that this is not actually a bug.''

 ''Mod is not a synonym for remainder, and Sage is very good about not
 making the answer an integer. By later silently converting the answer into
 a remainder it has forsaken me, and undermined my trust.''

 (P.S.: The "I" above is not me. -ppurka)

--
Ticket URL: <http://trac.sagemath.org/ticket/15709>
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.

Reply via email to