rpn(1): fixed exponentiation
This commit is contained in:
parent
d3470233ea
commit
5b364e104e
@ -165,7 +165,7 @@ fn eval(
|
|||||||
Subtract => stack.push_back(y - x),
|
Subtract => stack.push_back(y - x),
|
||||||
Multiply => stack.push_back(y * x),
|
Multiply => stack.push_back(y * x),
|
||||||
Divide => stack.push_back(y / x),
|
Divide => stack.push_back(y / x),
|
||||||
Power => stack.push_back(x.powf(y)),
|
Power => stack.push_back(y.powf(x)),
|
||||||
Floor => stack.push_back((y / x).floor()),
|
Floor => stack.push_back((y / x).floor()),
|
||||||
Modulo => stack.push_back(y % x),
|
Modulo => stack.push_back(y % x),
|
||||||
_ => {},
|
_ => {},
|
||||||
|
Loading…
Reference in New Issue
Block a user