Dear developers, first let me thank you for the excellent job you are doing. Recently I have found out a problem during the computation of the numerator and the denominator of expressions involving nested functions. A simple example is enclosed in the file test_normal.cc . Output of the program linked against the current git repository or the version 1.6.3 is in the file test_normal.log . Though the denominator of both terms is the same, the program returns the square of it. I looked into the source code. Seem like functions replace_with_symbol(const ex & e, exmap & repl, exmap & rev_lookup) and replace_with_symbol(const ex & e, exmap & repl) defined in the file normal.cpp search repl for an original expression but insert into repl alredy substitued expression. Then the repeated search does not work and a new symbol is introduced. I tried to fix it with the enclosed patch normal.cpp.patch. Is it acceptable as a solution of the problem? Best regards, Ladislav Zejda
Hi Ladislav, On 03/11/2015 12:26 AM, Ladislav Zejda wrote:
Dear developers,
first let me thank you for the excellent job you are doing.
Recently I have found out a problem during the computation of the numerator and the denominator of expressions involving nested functions. A simple example is enclosed in the file test_normal.cc . Output of the program linked against the current git repository or the version 1.6.3 is in the file test_normal.log . Though the denominator of both terms is the same, the program returns the square of it.
I looked into the source code. Seem like functions replace_with_symbol(const ex & e, exmap & repl, exmap & rev_lookup) and replace_with_symbol(const ex & e, exmap & repl) defined in the file normal.cpp search repl for an original expression but insert into repl alredy substitued expression. Then the repeated search does not work and a new symbol is introduced. I tried to fix it with the enclosed patch normal.cpp.patch. Is it acceptable as a solution of the problem?
Best regards, Ladislav Zejda
Thanks for your bug report and the patch. I've applied it. Best wishes -richard. -- Richard B. Kreckel <http://in.terlu.de/~kreckel/>
participants (2)
-
Ladislav Zejda
-
Richard B. Kreckel