mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-04 21:51:20 +01:00
Fix f(x) = x^x
not working, closing #117
This commit is contained in:
parent
1318809218
commit
2fea9777d6
@ -315,7 +315,10 @@ fn analyse_binary(
|
||||
Identifier::from_full_name("transpose"),
|
||||
vec![analyse_expr(context, left)?],
|
||||
)),
|
||||
(Expr::Var(identifier), right) => analyse_var(context, identifier, None, Some(right)),
|
||||
(Expr::Var(identifier), right) => {
|
||||
let right = analyse_expr(context, right)?;
|
||||
analyse_var(context, identifier, None, Some(right))
|
||||
},
|
||||
(left, right) => Ok(Expr::Binary(
|
||||
Box::new(analyse_expr(context, left)?),
|
||||
TokenKind::Power,
|
||||
|
@ -1,5 +1,7 @@
|
||||
x = 2
|
||||
y = 3
|
||||
f(x) = 2x(x - 3)(y + 2)
|
||||
g(x) = x^x
|
||||
|
||||
2f(f(x) + y) * 2 = 13600
|
||||
2f(f(x) + y) * 2 = 13600 and
|
||||
g(2) = 4
|
||||
|
Loading…
Reference in New Issue
Block a user