"trigrat" caught in infinite loop - depending on how you call it
Subject: "trigrat" caught in infinite loop - depending on how you call it
From: David Scherfgen
Date: Wed, 07 Nov 2012 13:28:23 +0100
Hello Maxima users,
I have discovered a very strange bug in Maxima, which I am about to
report on SourceForge.
But nevertheless, I want to ask if any of you has come across this one
or might be able to help me circumvent it.
The following works:
e : 2*x/(sqrt(y)+x) - (x^2/((sqrt(y)+x)^2));
trigrat(e);
trigrat(xthru(e));
But when I do this:
( trigrat(e), trigrat(xthru(e)) )
or
[ trigrat(e), trigrat(xthru(e)) ]
the second "trigrat" call inside will hang, i.e. Maxima will run on 100%
CPU and will never return.
So: evaluating both lines separately works, but evaluating them together
or inside a function will cause the "bug".
Strangely, everything works fine when I swap the expressions:
( trigrat(e), trigrat(xthru(e)) ); /* loops forever */
( trigrat(xthru(e)), trigrat(e) ); /* works */
I can't find a pattern ... it seems very mysterious to me.
Any idea what might be happening here?
Regards,
David Scherfgen