Skip to content
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

wrong subs in rising_factorial #39406

Open
2 tasks done
mantepse opened this issue Jan 29, 2025 · 4 comments · May be fixed by #39409
Open
2 tasks done

wrong subs in rising_factorial #39406

mantepse opened this issue Jan 29, 2025 · 4 comments · May be fixed by #39409
Labels

Comments

@mantepse
Copy link
Collaborator

Steps To Reproduce

sage: var("a, b")
(a, b)
sage: rising_factorial(a, b).subs({a:1})
gamma(b + 1)
sage: rising_factorial(-a, b).subs({a:1})
0

Expected Behavior

The result should be rising_factorial(-1, b), which is 0 only if b > 1.

Actual Behavior

The result is 0.

Additional Information

#19461

Environment

not relevant

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@harith-hacky03
Copy link

@mantepse Can start working on this?

@mantepse
Copy link
Collaborator Author

No need to ask, @harith-hacky03. If you think you can do it, propose a pull request. Do you understand the mathematics behind it?

@pawani27
Copy link

@mantepse Can this be happening because gamma(-1) is infinity? To solve this can we just put a condition there that is: if a<0 and b>(-a) only then for gamma to return?
I am a new contributor, so I apologise if it sounds stupid

@harith-hacky03
Copy link

@mantepse Yes , i understand it , i got some conclusions can you let me know is it correct or anything needs to be changed ?

Thank you : )

IMG20250129233737.jpg

@harith-hacky03 harith-hacky03 linked a pull request Jan 30, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants