Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with variable resolution in user defined functions #117

Closed
32Bites opened this issue May 10, 2023 · 2 comments
Closed

Issues with variable resolution in user defined functions #117

32Bites opened this issue May 10, 2023 · 2 comments

Comments

@32Bites
Copy link

32Bites commented May 10, 2023

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.

@PaddiM8
Copy link
Owner

PaddiM8 commented Jun 7, 2023

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!

PaddiM8 pushed a commit that referenced this issue Jul 19, 2023
@PaddiM8
Copy link
Owner

PaddiM8 commented Jul 19, 2023

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.

@PaddiM8 PaddiM8 closed this as completed Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants