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

Support aliases for simplify, deriv and etc. #131

Closed
sys27 opened this issue Aug 29, 2016 · 1 comment · Fixed by #652
Closed

Support aliases for simplify, deriv and etc. #131

sys27 opened this issue Aug 29, 2016 · 1 comment · Fixed by #652
Assignees
Milestone

Comments

@sys27
Copy link
Owner

sys27 commented Aug 29, 2016

Support aliases for simplify, deriv and etc. (for function which is not calculated in parser)

@sys27 sys27 added this to the xFunc 3.1.0 milestone Aug 29, 2016
@sys27 sys27 removed this from the xFunc 3.1.0 milestone Oct 13, 2016
@sys27 sys27 self-assigned this Jan 29, 2017
@sys27 sys27 added this to the xFunc 3.4.0 milestone Jan 29, 2017
sys27 added a commit that referenced this issue Feb 3, 2017
@sys27 sys27 removed this from the xFunc 3.4.0 milestone Feb 26, 2017
sys27 added a commit that referenced this issue Aug 31, 2020
@sys27
Copy link
Owner Author

sys27 commented Jul 12, 2023

Restrict the direct return/pass of expressions, return/pass a lambda instead. For example:

simplify(x * x) -> simplify((x) => x * x)

So, if the function accepts the "raw" expression (instead of the result of the calculation), then we need to specify it explicitly. And simplify(x * x) will be executed as:

  • calculate x * x, for example, 10 is assigned to x, then x * x -> 100
  • execute simplify(x * x) as simplify(100)

It will fix the issue but at the same time will increase the complexity of xFunc grammar/expression.

Related: #628.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant