rpn(1): fixed exponentiation

This commit is contained in:
Emma Tebibyte 2024-02-13 16:57:29 -07:00
parent d3470233ea
commit 5b364e104e
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -165,7 +165,7 @@ fn eval(
Subtract => stack.push_back(y - x),
Multiply => 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()),
Modulo => stack.push_back(y % x),
_ => {},