Skip to content

Assume all params are non-negative #268

@mstechly

Description

@mstechly

In many cases we can safely assume all the parameters in a routine are positive, which, in turn, might have two effects:

  1. Will allow sympy to simplify the expressions more on the fly
  2. Might be very useful for rewriters.

This can be easily done using sympy's nonnegative keyword: x=Symbol("x", nonnegative=True), and AFAIR is much easier if done at creation of the symbol, rather than modified later.
However, I'm not sure if we're not re-creating the symbols somewhere etc., so needs to be done with caution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions