#10972: Make sure symbolic functions return symbolic answers
-------------------------+--------------------------------------------------
   Reporter:  kcrisman   |       Owner:  burcin
       Type:  defect     |      Status:  new   
   Priority:  major      |   Milestone:        
  Component:  symbolics  |    Keywords:        
     Author:             |    Upstream:  N/A   
   Reviewer:             |      Merged:        
Work_issues:             |  
-------------------------+--------------------------------------------------
 From sage-support:
 {{{
 > I'm running Sage 4.6.2.  I've just noticed that if I evaluate various
 > symbolic expressions which return 0 then the 0 returned is a python int,
 > rather than a Sage integer.  examples of such expressions are sin(0),
 > tan(0), ln(0).
 > Is there a reason for this or is it a bug?


 I would consider this a bug, but because it should return a symbolic
 expression.
 sage: a = sin(pi)
 sage: a
 0
 sage: type(a)
 <type 'sage.symbolic.expression.Expression'>
 It's possible to get this behavior:
 sage: type(sin(0,hold=True).simplify())
 <type 'sage.symbolic.expression.Expression'>
 Anyway, this is an oversight, I would say.  Anyone else care to
 comment?  Otherwise it would be great if you'd file a bug report.
 This is important to fix, because some Sage code depends on the input
 in integer form being Sage integer or something else with Sage
 methods, not a Python int, and one could imagine someone relying on
 this and getting a nasty exception.
 }}}

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