Skip to content

Add fastSignum method to Algebraic.Expr #433

@tixxit

Description

@tixxit

In many cases we can likely compute the sign much quicker than we have been. Specifically, in the case of addition/subtraction, we immediately fall to computing an approximation. However, for an expression like x + y, we only need to approximate the value if x.signum * y.signum == -1. Adding a fastSignum method which just handles these shortcuts would let us test the sign cheaply before performing unnecessary work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions