#7545: Gaussian Integers
-------------------------------------------------+-------------------------
       Reporter:  wuthrich                       |        Owner:
           Type:  enhancement                    |  davidloeffler
       Priority:  minor                          |       Status:
      Component:  number fields                  |  needs_info
       Keywords:  gaussian integers, Z[i],       |    Milestone:  sage-
  quadratic number ring                          |  wishlist
        Authors:                                 |   Resolution:
Report Upstream:  N/A                            |    Merged in:
         Branch:                                 |    Reviewers:
   Dependencies:                                 |  Work issues:
                                                 |       Commit:
                                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by vdelecroix):

 Replying to [comment:30 wuthrich]:
 > Why {{{I}}} is a symbolic expression in sage now is a mystery to me.
 Surely it should be in Z[i], just like 2 is in Z. That {{{I^2}}} is a
 symbolic expression and not an integer seems particularly inconvenient.

 Agreed: this is '''very''' annoying. And actually, defining `I` as the
 generator of `ZZ[I]` might work out of the box
 {{{
 sage: good_I = QuadraticField(-1,'I').gen()
 sage: (good_I + 1.0).parent()
 Complex Field with 53 bits of precision
 sage: (good_I + 1/2).parent()
 Number Field in I with defining polynomial x^2 + 1
 sage: good_I == I        # not perfect
 I == I
 sage: bool(good_I == I)  # but not that bad
 True
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/7545#comment:31>
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/d/optout.

Reply via email to