-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
So the math module has 2 different exponentiation functions, pow(x,y) and ``^(x,y). The operator version (`^`) can't handle negative `y`, which is an unexpected limitation.
Since both are ostensibly supposed to represent the same operation ("x raised to the power of y"), I'd suggest making ^ an alias for pow() (least surprise, right?), and optimizing pow() if needed/desired.
This hopefully wouldn't break any existing code (exponentiation is exponentiation, in theory), and frankly it's probably best to end the opportunity for any code to depend on the difference.