Skip to content

Conversation

@khanhkhanhlele
Copy link
Contributor

@khanhkhanhlele khanhkhanhlele commented Nov 11, 2025

This PR adds method DoubleFactorial.
Contribution by Gittensor, learn more at https://gittensor.io/

Copilot AI review requested due to automatic review settings November 11, 2025 02:49
Copilot finished reviewing on behalf of khanhkhanhlele November 11, 2025 02:50
Copy link

Copilot AI left a 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
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.90%. Comparing base (6c3203b) to head (5e57006).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siriak
Copy link
Member

siriak commented Nov 11, 2025

Please check the comments

Copilot AI review requested due to automatic review settings November 11, 2025 11:11
Copy link

Copilot AI left a 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.

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak enabled auto-merge (squash) November 11, 2025 13:44
@siriak siriak merged commit 86374cd into TheAlgorithms:master Nov 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants