]> 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:11:57 +0000 (09:11 +0200)
commit9506030d2059ef868d5da8dcbe714c9c5b50ff50
tree8fbbef150c73c0e31a5a40a72840ae5671bf27d6
parent8cce492692eb74d636a50f420fd79877e5d4981a
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