]> www.ginac.de Git - ginac.git/commit
Be more careful about final top-level substitution.
authorRichard Kreckel <kreckel@ginac.de>
Wed, 15 Sep 2010 07:11:57 +0000 (09:11 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 15 Sep 2010 07:36:28 +0000 (09:36 +0200)
commit90ad10b58d02365a407b2d84d8b93e50030feaa5
treef257283f5a869a8234d4c56b3d94b453e31f1406
parentdb47e259edabbed2b8eb2fa1e4ed93588c26e304
Be more careful about final top-level substitution.

Substituting x==log(x) in exp(x) erroneously returned log(x) because of a
final subst(x==log(x)) after having eval'ed exp(log(x)) -> x. This final
substitution is wrong in the general case. On the other hand, the intent
is to syntactically substitute functions of a given kind etc. This patch
suppresses the final top-level substitution unless the intermediate result
is a container.

Thanks to Burcin Erocal for reporting this bug (originally described by
Kees van Schaik on sage-support@googlegroops.com).
check/exam_misc.cpp
doc/tutorial/ginac.texi
ginac/container.h