-
-
Notifications
You must be signed in to change notification settings - Fork 240
Open
Labels
Description
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.