- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 559
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
f(expr,hold).n() fails for all generalized functions #16587
Comments
comment:1
You can always feel free to cc: me on any ticket coming from something I was involved in :) |
comment:3
Actually all functions in
All the generalized functions have this code in
|
comment:4
Isn't the problem simply that these functions are missing an |
comment:5
Thanks. This begs for a subclass of |
comment:6
Replying to @rwst:
I don't see why. |
Commit: |
comment:9
Replying to @jdemeyer:
Because I didn't want to create an New commits:
|
comment:10
Replying to @rwst:
But now you create a
No, I still do not see the reason for a new class. |
comment:11
Also, do we really need the |
comment:12
We also should decide whether
should automatically simplify to
or remain unevaluated. |
comment:13
Related: #17285 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Please confirm this is what you think should go in as basic change to address the original issue. I feel |
comment:16
After thinking about this more, perhaps the
doesn't currently simplify to |
comment:17
Is this related? |
comment:18
Replying to @jdemeyer:
To finally answer this, no, it will still trigger the exception with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed branch from u/rws/f_expr__n___fails_for_all_generalized_functions to u/rws/16587 |
This comment has been minimized.
This comment has been minimized.
Author: Ralf Stephan |
comment:23
I tried to checkout this ticket and rebuild Sage but that failed. Branch needs updating. |
Reviewer: Paul Masson |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:25
The branch merges cleanly with develop (green link) so it should have worked after |
comment:26
Doctests pass.
Looks like its trying to evaluate arguments as complex numbers. And for future reference, is it expected practice for people to merge the current develop branch before pushing to Trac? Or is it a matter of how the branch is assembled, especially for older tickets, and I just need to pay attention to what gets pulled? |
comment:27
Replying to @paulmasson:
There should be as few merge commits as possible but you can't always adhere to that. As author, you of course need to merge if what you uploaded before doesn't with develop (red link on ticket). But as you saw, there was a branch that was so old that it could no longer be compiled so I needed to merge it too. Note that as a reviewer you do not need to do So, to answer, in principle you need not merge the current develop branch before pushing as long as the branch merges cleanly with develop. A good reason to do it nevertheless would be that you want to make sure your changes pass tests (which are always done by patchbot or the RM with develop). What you want to pay attention to as reviewer OTOH is the age of the last merge commit (or the first commit if none) and rather pull (see above) than checkout if older than say 18 months. |
Changed branch from u/rws/16587 to u/rws/16587-1 |
comment:30
Doctests pass. Functions behaved as expected as per ticket. Ready to go. |
Changed branch from u/rws/16587-1 to |
The original problem is now resolved, it was reported in http://ask.sagemath.org/question/8535/problem-with-sign-sgn-and-n/ by Louis Cypher:
kcrisman:
Problem seems to be that in
M.n??
we see that it's looking foris_a_numeric(x._gobj)
but apparently that fails, as does the constant, so it thinks we are looking at evaluatingsgn(cos(x))
instead ofsgn(cos(3/2))
.Depends on #17130
Depends on #17285
CC: @kcrisman
Component: symbolics
Keywords: sgn, evaluation
Author: Ralf Stephan
Branch/Commit:
e7880b7
Reviewer: Paul Masson
Issue created by migration from https://trac.sagemath.org/ticket/16587
The text was updated successfully, but these errors were encountered: