#8860: incoherent types for real numbers
--------------------------------+-------------------------------------------
   Reporter:  zimmerma          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  new       
   Priority:  minor             |   Milestone:            
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------
 This was reported by Francois Maltey:
 {{{
 sage: map (type, [float(1.2), N(1.2), N(1.2,digits=50)])

                            [<type 'float'>,
                             <type 'sage.rings.real_mpfr.RealLiteral'>,
                             <type 'sage.rings.real_mpfr.RealNumber'>]
 }}}
 Why does the second one return {{{RealLiteral}}} and the 3rd one
 {{{RealNumber}}}?

 Side question: how does one test if the type of an object
 corresponds to a real number, like for example:
 {{{
 type (345) is Integer, type([1,2,3]) is list, type (2/3) is Rational
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8860>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to