-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: add method DoubleFactorial #567
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a DoubleFactorial implementation that calculates the double factorial (n!!) of non-negative integers, which is the product of all integers from 1 up to n that have the same parity as n.
- Adds
DoubleFactorial.Calculate()method that handles both odd and even cases using BigInteger - Includes comprehensive test coverage for base cases, odd/even numbers, large numbers, and negative input validation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| Algorithms/Numeric/DoubleFactorial.cs | Implements the double factorial calculation with BigInteger support for large numbers |
| Algorithms.Tests/Numeric/DoubleFactorialTests.cs | Adds unit tests for valid inputs and negative number edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #567 +/- ##
==========================================
- Coverage 96.90% 96.90% -0.01%
==========================================
Files 294 295 +1
Lines 12188 12204 +16
Branches 1767 1770 +3
==========================================
+ Hits 11811 11826 +15
Misses 239 239
- Partials 138 139 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Please check the comments |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
siriak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
This PR adds method DoubleFactorial.
Contribution by Gittensor, learn more at https://gittensor.io/