rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

bug with assume_pos #2653

Open rtoy opened 1 week ago

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 17:11:03 Created by wihaa on 2018-02-23 18:16:33 Original: https://sourceforge.net/p/maxima/bugs/3405


Dear all!

This is probably a weird bug:

ev(cabs(1/(omega**4-2*omega**2)),assume_pos=true);

yields the error message (stack overflow?):

Binding stack guard page temporarily disabled: proceed with caution
Maxima encountered a Lisp error:
 Binding stack exhausted.
PROCEED WITH CAUTION.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

ev(cabs(1/(omega**4-omega**2)),assume_pos=true); works fine!

Wilhelm Haager

rtoy commented 1 week ago

Imported from SourceForge on 2024-07-06 17:11:04 Created by robert_dodier on 2018-02-28 18:58:31 Original: https://sourceforge.net/p/maxima/bugs/3405/#97d4


(Pasting my comments from the mailing list here)

What is happening here is that Maxima is attempting to find the sign of 2*x^2-x^3 and after some fumbling around, it tries x-(2*x^2)^(1/3) instead. Then it goes back to 2*x^2-x^3 and it keeps cycling back and forth until the stack overflows.

Some related expressions bottom out and terminate. I don't know why oneterminates and not another. I also don't know why assume_pos=true makes a difference. assume(x>0) yields the same result, and I don't know why cabs causes an error and not abs.