Issues with variable resolution in user defined functions
32Bites opened this issue · 2 comments
There would appear to be an issue with how the caret operator, which in this context ought to be treated as the exponentiation operator, resolves variables.
This is a minimal working example of the issue seen in f(x) = x^x
, where the resulting error is Undefined variable: 'x'.
when calling the function with f(1)
.
The issue would appear to be in how the exponent is evaluated, since f(x, y) = x^y
when called with say f(2, 2)
, results in Undefined variable: 'y'.
.
I have yet to delve deep into the code to determine the cause of the issue since I was using Kalker to complete some math homework, however, when I'm not busy I will try to figure out the problem on my own time.
Hmm yeah you're right, I can reproduce this as well. I could look into it as well if you don't end up doing so. Thanks!
Should now be fixed. Turns out it perform analysis on the right hand side of power expressions, which is when it's connected to it's parent function.