-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
return Infinity from factorial of negative integer #21560
Comments
comment:1
I would like to work on this issue. However, one of the CASs sympy, returns a zero for a negative number given as the input. I would like to clarify if it is required to return unsigned infinity or zero. You can refer this-> http://docs.sympy.org/0.7.1/_modules/sympy/functions/combinatorial/factorials.html |
comment:3
Note that already
If you decide against Infinity then please change the above for consistency (you can find the code in |
comment:4
As to which one it should be, I guess that's arbitrary. You may need to change code that depends on the exception (maybe there is some in |
comment:5
Note also
which would be the third alternative. |
comment:6
I feel that it would be better if Unsigned Infinity is returned because in case we return any other value, too many files in different components have to be modified to make sure that the consistency is proper. I will modify the function such that it returns Unsigned Infinity when the input is negative by importing |
comment:7
Will it be right here to import unsigned infinity from |
comment:8
That's a style question. I personally import from the specific file instead of from all. I remember a discussion here that recommended that because this way less is imported and less time used. I could not find a reference, sorry. You see both styles used in Sage. |
Commit: |
Author: Ashutosh Ahelleya |
New commits:
|
Adapt the function's behaviour to what other CASs (sympy, Wolfram) do at integer n<-1: return unsigned infinity.
Component: symbolics
Author: Ashutosh Ahelleya
Branch/Commit: u/aashu12/return_infinity_from_factorial_of_negative_integer @
02fc09c
Issue created by migration from https://trac.sagemath.org/ticket/21560
The text was updated successfully, but these errors were encountered: