Skip to content

free_symbols #24

Description

@jverzani

I noticed browsing the Giac docs there is a better way to implement free_symbols (fewer allocations, more performant)

"""
    free_symbols(ex::GiacExpr) -> GiacExpr

Return the free symbols in a symbolic expression
"""
function free_symbols(ex::GiacExpr)::GiacExpr
    return Commands.lname(ex)
end

This returns a GiacExpr that can be converted into a vector or list, so is a change from returning a Set of GiacExpr objects,

If you think this a worthwhile change, I can submit a PR. Otherwise, perhaps adding a link to lname in the docstring would be helpful if someone was concerned with performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions