From 9c9172d4c980b36236d1f0551b70cca9034948d7 Mon Sep 17 00:00:00 2001 From: Book-reader Date: Fri, 5 Sep 2025 21:09:31 +1200 Subject: [PATCH] fix exponent precedence --- asklyphe-frontend/src/math.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asklyphe-frontend/src/math.rs b/asklyphe-frontend/src/math.rs index 4e15f72..3394d86 100644 --- a/asklyphe-frontend/src/math.rs +++ b/asklyphe-frontend/src/math.rs @@ -44,7 +44,7 @@ impl Op { BinOp::Subtract => 1.0, BinOp::Multiply => 2.0, BinOp::Divide => 2.0, - BinOp::Exponent => 3.0, + BinOp::Exponent => 3.1, }, Op::Func(_) => 0.0, // TODO: decide if this is a good LBP } @@ -59,7 +59,7 @@ impl Op { BinOp::Subtract => 1.1, BinOp::Multiply => 2.1, BinOp::Divide => 2.1, - BinOp::Exponent => 3.1, + BinOp::Exponent => 3.0, }, Op::Func(_) => 4.0, // TODO: decide if this is a good RBP }