Open anutosh491 opened 5 months ago
So basically I see 2-3 conditional statements and we can address all except one
Remove this:
if limitinf(b1, x) is S.One:
if limitinf(e1, x).is_infinite is False:
return mrv(exp(e1*(b1 - 1)), x)
or throw an exception.
The last two TODO items thus don't apply.
As for S.One
, we can support it and just do S(1)
, or we can rewrite the code to just do S(1)
. I would actually not support S.One
at all, it seems hackish and I think the only advantage is that it is faster in SymPy, but in LPython there is no speed advantage, just duplicate syntax, so I would just stick to S(1)
.
So the case overall from sympy's gruntz.py looks like
I think we have like to have
e1 = S.One
(which is basically introducing a constant 1, I think we have support through symengine for this) . TheS.One
constant is being used thrice so we would want that..is_infinite
can also be supported through SymEnginelimitinf
function. We aren't supporting limits for now and not sure is SymEngine's C API has any kind of support for it.EDIT : Even for the first TODO we have the
SymbolicInteger
Intrinsic function node, so we can delay introducingS.One
for a while