#9891: substitute goes too far: (5-e^x).substitute(x=log(x)) -> 5-log(x)
-------------------------+--------------------------------------------------
   Reporter:  burcin     |       Owner:  burcin                                 
    
       Type:  defect     |      Status:  new                                    
    
   Priority:  critical   |   Milestone:  sage-4.6                               
    
  Component:  symbolics  |    Keywords:  pynac                                  
    
     Author:             |    Upstream:  Not yet reported upstream; Will do 
shortly.
   Reviewer:             |      Merged:                                         
    
Work_issues:             |  
-------------------------+--------------------------------------------------
 Reported by Kees on sage-support:

 http://groups.google.com/group/sage-support/t/bfa34b077dd31b73

 {{{
 Running the following few lines:

 eq=5-e^x
 print "1:",eq.substitute(x=3*x)
 print "2:",eq.substitute(x=log(x))

 yields the output (Sage 4.5.2 with Ubuntu):

 1: -e^(3*x) + 5
 2: -log(x) + 5
 }}}

 This is also present in GiNaC:

 {{{
 ginsh - GiNaC Interactive Shell (ginac V1.5.7)
   __,  _______  Copyright (C) 1999-2010 Johannes Gutenberg University
 Mainz,
  (__) *       | Germany.  This is free software with ABSOLUTELY NO
 WARRANTY.
   ._) i N a C | You are welcome to redistribute it under certain
 conditions.
 <-------------' For details type `warranty;'.

 Type ?? for a list of help topics.
 > subs(5-exp(x),x==log(x));
 5-log(x)
 }}}

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