Skip to content

Discussion on supporting Pow instances for mrv function #2526

Open
@anutosh491

Description

@anutosh491

So the case overall from sympy's gruntz.py looks like

    elif e.is_Pow and e.base != S.Exp1:
        e1 = S.One
        while e.is_Pow:
            b1 = e.base
            e1 *= e.exp
            e = b1
        if b1 == 1:
            return SubsSet(), b1
        if e1.has(x):
            if limitinf(b1, x) is S.One:
                if limitinf(e1, x).is_infinite is False:
                    return mrv(exp(e1*(b1 - 1)), x)
            return mrv(exp(e1*log(b1)), x)
        else:
            s, expr = mrv(b1, x)
            return s, expr**e1

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) . The S.One constant is being used thrice so we would want that.
  • .is_infinite can also be supported through SymEngine
  • The only thing that I'm not sure how it should be supported is the limitinf 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 introducing S.One for a while

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions