#16436: is_real method should exist for elements of AA, ZZ, QQ
-------------------------------+------------------------
       Reporter:  slabbe       |        Owner:
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-6.3
      Component:  algebra      |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by tmonteil):

 Hi Sebastien. Note that you can also use coercion with the poorest real
 representation:

 {{{
 sage: AA(3) in RealField(2)
 True
 sage: CC(3) in RealField(2)
 True
 sage: RR(3) in RealField(2)
 True
 sage: SR(3) in RealField(2)
 True
 sage: ZZ(3) in RealField(2)
 True
 sage: QQ(3) in RealField(2)
 True
 sage: AA(3) in RealField(2)
 True
 sage: QQbar(3) in RealField(2)
 True
 }}}

 though you need to be careful with `NaN` and `+/-Infinity` that also
 belong to `RealField(2)`. By the way:
 {{{
 sage: SR(Infinity).is_real()
 True
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16436#comment:1>
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