From: SourceForge.net <no...@so...> - 2008-08-15 00:03:00
|
Bugs item #2051391, was opened at 2008-08-14 06:37 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2051391&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Simplification Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Dr. Schorsch (xorx) Assigned to: Nobody/Anonymous (nobody) Summary: subst command does not work with equation list Initial Comment: The subst command does not work the same way with a list of substitution equations as with a directly specified substitution. Example: (%i1) h:sin( y + 2*x)*cos(y+2*x)-(y+2*x)*3; (%o1) cos(y+2*x)*sin(y+2*x)-3*(y+2*x)(%i2) (%i2) subst(a,y+2*x,h); (%o2) cos(a)*sin(a)-3*a(%i3) (%i3) subs:[a=y+2*x]; (%o3) [a=y+2*x] (%i4) subst(subs,h); (%o4) cos(y+2*x)*sin(y+2*x)-3*(y+2*x) (%i5) subst([a=y+2*x],h); (%o5) cos(y+2*x)*sin(y+2*x)-3*(y+2*x) Expression 2 does work fine, while expression 3,5 and 5 do not produce the expected result. ---------------------------------------------------------------------- >Comment By: Robert Dodier (robert_dodier) Date: 2008-08-14 18:02 Message: Logged In: YES user_id=501686 Originator: NO I think subst([y + 2*x = a], h) works as expected (i.e. with the equation turned around). When the subst argument is a list of equations, the left-hand side of each equation is the term to be replaced --- that is different from the form subst(foo, bar, baz) in which bar is to be replaced. Sorry that this is confusing. Closing this report as "won't fix" since it is only a case of confusion, and I don't think it is serious enough to warrant changing subst. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2051391&group_id=4933 |