You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Answer a limit on a side that is not real with its directed infinity where the phase settles #2697
Follow-up to #2693. #2696 leaves a limit unevaluated where the side approached is not real and Gruntz's algorithm would have read an exponential as positive. That removes the wrong +oos, but some of these limits have a well-defined directed infinity: the modulus grows without bound while the argument settles.
On the principal branch, with mpmath at 60 digits:
Master already answers this shape elsewhere with a directed infinity. ln(x) at 0- is -oo (the value is ln|x| + i pi), sqrt(x)/x at 0- is -ooi, and x^(1/2) at -oo is +ooi.
Proposal:
Where the side is not real, read an exponential's sign from its phase when the phase tends to a constant: e^(-i pi) is -1 and e^(-2 i pi) is 1.
Answer with the matching directed infinity: +oo, -oo, +ooi or -ooi.
Decline when the phase does not settle. For example, x^(1/x) at 0- has phase pi/x, which keeps turning while the modulus grows, so its limit is the undirected complex infinity.
Change the test that pins sin(x)^(x - 2) at 0- as unevaluated (AnExponentThatOnlyTendsToAWholeNumberIsLeftAloneUnderANegativeBase) to +oo.
A directed -oo on a side that is not real is not the real negative infinity. It is the same reading master already gives ln(x) at 0-, so this adds no new risk to callers, but it should be stated in the BREAKING-CHANGES entry.
Agreed with the maintainer on 2026-12-04: #2696 merges first with the decline, then this.
Activity
Apply l'Hopital's rule to a complex denominator only where its deriva…