-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Make evaluation possible for 'hold' objects #10034
Comments
comment:1
This is related to #10071, which is about functions which can't even be evaluated using Maxima or |
comment:3
Here's a patch which makes evaluation possible, simply by walking the expression and evaluating all operations. It does not work for the functions in #10071, because the Patchbot apply trac_10034.patch |
Attachment: trac_10034.patch.gz |
comment:4
Glance looks good. Before I think more about this, a question - is |
comment:5
The Ah right, I'll switch the examples to this. There's no reason why these expressions should be transferred to Maxima simply for evaluating an operation. |
comment:6
Ok. As another remark (and you might hate me for this one), I could imagine someone wanting to evaluate some but not all of the held operations. I think this is possible with your patch and judicious use of |
comment:7
I've thought about this. One option is to use pattern matching to specify the parts to evaluate, but I don't how the expression could be reconstructed afterwards. Another option is to have an argument for providing a list of operators not to evaluate (I think it's better to have an argument to exclude rather than include, because it is difficult to find all the operators in Sage, while finding ones to exclude just involves searching the expression). Then for the |
comment:8
Okay, the new patch renames Patchbot apply trac_10034_2.patch |
Attachment: trac_10034_2.patch.gz |
comment:9
Actually, the way I implemented it is not correct, since if the length of the operands is over two it reduces the rest of the operands using the operator. This is the desired behaviour for the arithmetic operators, but not generally. |
comment:11
Maybe this should also fix other places the hold stuff is shown, e.g. functions/trig.py. |
comment:15
I don't think an |
comment:16
What I wrote:
is of course nonsense. Every function that sends the held expression through Maxima unchanged would work because the hold status gets lost. The expansion happens in Pynac's |
comment:17
Previous title restored. |
Commit: |
Author: Eviatar Bach, Ralf Stephan |
comment:19
I used the convenient New commits:
|
Changed branch from u/rws/make_evaluation_possible_for_pynac__hold__objects to u/rws/10034-1 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:25
Right. Thanks for the review. Please add your name to Reviewers: too. |
Reviewer: Paul Masson |
Changed branch from u/rws/10034-1 to |
See #9879, where it is now possible to 'hold' a symbolic expression:
However, without going through Maxima and
a.simplify()
, it isn't clear how to get the actual answer for this. Either by changingsimplify()
to try simplifying through Pynac first, or by adding something like ana.eval()
method, we should make that possible without Maxima.CC: @eviatarbach @paulmasson
Component: symbolics
Author: Eviatar Bach, Ralf Stephan
Branch/Commit:
6e4c716
Reviewer: Paul Masson
Issue created by migration from https://trac.sagemath.org/ticket/10034
The text was updated successfully, but these errors were encountered: