-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
evaluating symbolic expressions (without conversion to SR, i.e., staying in ring of values) #18092
Comments
Branch: u/dkrenn/SR/eval |
New commits:
|
Commit: |
Author: Daniel Krenn |
comment:4
I think you misunderstand.
I have no idea if your idea is worth the effort, but suspect that not if it is only based on the necessity to prevent "conversion". |
This comment has been minimized.
This comment has been minimized.
comment:5
Replying to @rwst:
Ok, I used the wrong word; however, this example was to point out the differences between the two commands.
|
Changed keywords from none to sd66 |
comment:7
I thought everything coerces to |
comment:8
Replying to @rwst:
IMHO, not everything coerces into The following is not possible at with subs:
|
comment:10
Hello, Why not
Vincent |
comment:12
added a doctest and corrected a small bug |
comment:13
Replying to @videlec:
Ok, I see. Maybe RIFs are not a good example since they coerce into SR. Power series are better" example; since there problems. I'll rewrite the description of the ticket and the examples. |
comment:14
The general idea is that the result of arithmetic only depends on the parents of the input data, not on the values of the input data (because the idea is that these things implement maps, which have domains and codomains). When you evaluate a SR element at a non-symbolic value, you don't know if the result can live in the parent of the original result (e.g., The appropriate solution is probably to first convert your symbolic expression to a parent where the parent is the desired thing, e.g.
This also has other advantages: in principle, when you do this with RIF, you might end up with an evaluation routine that takes into account that the coefficients are not exact and hence it could choose some more stable way of doing the evaluation (I think that's hypothetical--likely no such effort is made right now, but it could). |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
rewritten documentation of function |
comment:18
Replying to @nbruin:
True.
What if
or something worse (including e.g. exp, log, sin, ... or other functions)? There are no parents (except SR) for any of these constructs. |
comment:19
Replying to @dkrenn:
And indeed it's tricky to evaluate the result. What is Anyway, |
comment:20
Replying to @nbruin:
Ok, I'll make some experiments and run some tests to see if it satisfies my needs. Thanks |
comment:21
Hello, Would this ticket solve the following issue (from #9787)?
Vincent |
comment:23
Replying to @dkrenn:
Sorry. This was not my question. What would be |
comment:24
Replying to @videlec:
No, not modified by this ticket. |
comment:25
Replying to @dkrenn:
I saw too late your answer on #9878 ;-) By the way, let me repeat another question from #9878. I found the behavior of
ie, |
comment:26
Replying to @videlec:
In the following it does the same as subs:
Indeed, this changes (I wasn't aware of this up to now):
This is because
From this,
|
comment:27
Replying to @dkrenn:
Argh. Definitely a bug to me. Another bug is that the variable defining a function should be transparent. And currently
Vincent |
comment:28
Please Cc: me with any ticket you open regarding |
comment:29
Replying to @videlec:
This is now #18259. |
comment:30
As to the original
I believe a more general way to have all possibilities of both |
comment:31
Replying to @nbruin:
I had another instance where I needed a version of
Using
It works, but the solution is hard to find and the notation a bit cumbersome. I see several solutions:
Opinions? |
comment:32
Replying to @rwst:
Is it realistic to hope that all conversions will exist? Do they always make sense? |
This ticket proposes a new method
evaluate
which can evaluate symbolic expressions at values coming from a ring which not coerces intoSR
. The result again lives in the ring of the values. This forces the calculation to be done completely in the given ring (and not in the symbolic ring, where sometimes one does not know exactly what's going on).For example:
which is not possible with
subs
CC: @cheuberg @mezzarobba
Component: symbolics
Keywords: sd66
Author: Daniel Krenn
Branch/Commit: u/dkrenn/SR/eval @
276f0f3
Issue created by migration from https://trac.sagemath.org/ticket/18092
The text was updated successfully, but these errors were encountered: