#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:                    |  
--------------------------------+-------------------------------------------

Comment(by robertwb):

 Rather than {{{type(x) is X}}} one should use {{{isinstance(x, X)}}} which
 handles subclasses gracefully. In general, I consider the exact value of
 type(x) to be an implementation detail subject to change. (For example,
 {{{type(GF(q, 'a'))}}} and {{{type(GF(q, 'a'))}}} depend on the value
 {{{q}}}, and changes over time.)

 {{{RealLiteral}}} doesn't do anything fancy (e.g. the sum of two
 {{{RealLiteral}}}s is just a {{{RealNumber}}}), it's just used so that
 floating point literals can be cast into higher precision (or exact) rings
 without being truncated to an intermediate 53 bit representation first. I
 consider this a feature rather than a bug.

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