rtoy / maxima

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

limit(a*inf) should ask sign of a, not just return a*inf #1537

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 18:08:10 Created by macrakis on 2022-01-17 17:24:55 Original: https://sourceforge.net/p/maxima/bugs/3920


limit(3*inf) correctly returns inf, and limit(-3*inf) correctly returns minf. Also, limit(inf^a) asks the sign of a and returns the correct result.

So why don't limit(a*inf) and limit(a^inf) ask about a and return the correct answer?

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 18:08:11 Created by willisbl on 2022-01-20 15:20:49 Original: https://sourceforge.net/p/maxima/bugs/3920/#7830


Fixing this is a matter of finding the right place to set *getsignl-asksign-ok* to true (without causing a mess):

(%i1)   limit(a*inf);
(%o1)   inf*a
(%i2)   :lisp(setf *getsignl-asksign-ok* t);
T
(%i2)   limit(a*inf);
"Is "a" positive, negative or zero?"pos;
(%o2)   inf