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

Transform functions to argumentless functions with custom operators (overriding existing functions) #162

Open
tirrorex opened this issue Mar 14, 2019 · 1 comment

Comments

@tirrorex
Copy link

tirrorex commented Mar 14, 2019

Taking for example the sin function which takes an argument.
I want to be able to evalue 24sin as sin(24), basically taking lhs as the argument for my function.

Creating the operator with custom token and the relation to multiply is easy but there is no documentation on how to add functionnalities to existing functions.

It seems that maybe a rewrite rule should be used ?

Any thoughts on this ?

@tirrorex
Copy link
Author

Following this :
Other calculators are using √ like 2√ being √(2)
The library refuses this and want √2
The problem being that 2√% (which is √(2)% ) cannot be calculated without adding parentheses
otherwise √(2%) is calculated which is not the same value.
The result i get with the library is the one for 2%√

I assume that again a rewrite rule might allow me to do what i want but i would need further informations for this.

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

1 participant