PATCH for "Parenthesization bug"

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Sat Jan 26 13:23:35 CET 2002


Hi,

On Fri, 25 Jan 2002, Roberto Bagnara wrote:
> A patch that solves the problem is attached:
> it passes `make check'

Ok, but there really isn't any output checking.  Originally, there was.  
But then we dropped it because the low degree of predictablility in
canonical ordering made it a burden to maintain.

Now, that we have an input parser, I fancy an idea: We can randomly create
all sorts of rational numbers with weird exponents, rational complex bases
etc. and build an ex from it.  This has then been run through the
anonymous evaluator and we can print it into an ostringstream.  Then we
can apply .to_str() on it, and have the expression be parsed again and
compared with the original.  If there are remaining bugs in either the
parser or (more likely) output, this should help shake them out.  Having
this in the default regression tests would guard us against future
failures, which are not unlikely to happen, a point to be proven soon...

>                        and fixes also the related bug
> exemplified by the following excerpt from a ginsh session (1.0.4):
> 
> > (-I)^e;
> (I)^e

Applied, thanks.  This one seems to have crept in in version 0.8.1.
Point proven.  :-)

> What is your advice?  Given that we cannot put up with that bugs,
> should we install the patched version on all our machines
> or should we wait for 1.0.5?  Translation: do you plan to release
> 1.0.5 RSN?  ;-)

Maybe next week.

Regards
    -richy.
-- 
Richard B. Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list