-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Doctest fix for: Make atan2(0,0) return NaN #21614
Comments
This comment has been minimized.
This comment has been minimized.
Dependencies: pynac-0.6.91 |
comment:2
I'm a bit uncomfortable with the idea of returning NaN for exact (as opposed to floating-point) input... But more importantly, my feeling is that we need to decide and document once and for all how symbolic functions should behave depending on the type, parent and value of their argument(s), based on the many examples you collected, instead of coming up with ad hoc solutions every time. |
comment:3
Then make it known in that documentation that I just decided that symbolic NaN is to be returned whenever the result is not defined, not even complex infinity. That pertains to expressions, not relations. It could also be returned with I think the SymPy folks have thought more about their ad hoc solution, and if I copy it it's not ad hoc, either.
|
Branch: u/rws/make_atan2_0_0__return_nan |
Commit: |
New commits:
|
Changed dependencies from pynac-0.6.91 to #21623 |
comment:6
Replying to @rwst:
Sorry if my comment came off as a criticism, that was not the intent. What I'm trying to say is that I find this kind of tickets hard to review, because I'm unable to tell if the change is actually an improvement (because it fixes a perceived issue) or a regression (typically because it introduces an inconsistency across different parts of Sage). |
comment:7
It is very hard to keep an overview of all details that can appear in "symbolics" (minus algebra). There are some bright people leading the SymPy effort. I think it's a good start to follow them. |
Author: Ralf Stephan |
Reviewer: Jeroen Demeyer |
Changed branch from u/rws/make_atan2_0_0__return_nan to |
Same with
tan
andimag
:SymPy expands similarly but gives NaN on substitution instead of an exception.
This all would not be of concern if not 3d plotting would likely need real/imag parts of a function, their workaround
real(...,hold=True)
works perfectly but this is not the general solution that is needed.One solution would be to return
NaN
instead of throwing up.Depends on #21623
Component: symbolics
Author: Ralf Stephan
Branch/Commit:
fda5183
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/21614
The text was updated successfully, but these errors were encountered: