-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Algebraic differentiation #411
Conversation
…te, with a few functions as well. Still does not handle argument errors well, even though it returns the same it received.
…s, and parse to test against.
… Added 'C^x' and FunctionAssignmentNodes.
… some error cases.
… a variable base log, and added a test case. Adjusted the chain rule to be after the switch statement (saves ~1640 bytes and is more modular).
This is really awesome! As far as I tested it all works like a charm! A few thoughts:
What do you think? |
This is one thing I wanted to ask about, but wasn't sure if it was considered directly related or simply an exhibit of when
Agreed, most other interfaces return (at least partially) simplified equations.
If we have a
In some places it isn't possible, given a lack of ParenthesisNodes to enforce an order of operations, but an implied order given the nesting of the Nodes, but in a lot of places it is possible. I can go back and try to clean that up, and I think that would be for the best. |
sounds good, thanks! |
…tions are possible. Used config.number on ConstantNodes that I missed on my original commits.
I have no idea where those errors are coming from. They seem unrelated to |
hm, I will have a look at it, see what it does on my machine. |
So I pulled from master, and it shows the errors. I think the error is that after the updates, the expression parser will not accept any SymbolNodes that are not in scope. Is it possible to add a variable to the scope without giving it a value? |
@BigFav I found the issue, it's not your fault... In order to implement lazy loading for the functions I had to change the way function transforms work. You can't used them with lazy loaded functions anymore. I see the docs do not reflect this and there was no error message too. Sorry for the trouble. I've now added an error message in case there is a transform attached to a factory function. And to solve the issue with derivative, I have moved the transform part of I've merged your work in a separate branch for now: https://github.com/josdejong/mathjs/tree/algebraic_differentiation. Though not yet ready to go public (related functions |
#35