Skip to content

Conversation

@khanhkhanhlele
Copy link
Contributor

This PR adds method TanhFunction.

Copilot AI review requested due to automatic review settings November 10, 2025 09:38
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 new implementation of the Hyperbolic Tangent (Tanh) activation function to the Algorithms library. The implementation provides methods to compute tanh for both single values and vectors of values.

  • Adds Tanh.Compute(double) for single value computation using Math.Tanh()
  • Adds Tanh.Compute(double[]) for element-wise vector computation
  • Includes comprehensive unit tests for the single value overload covering normal values, edge cases, and bounded output validation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Algorithms/Numeric/Tanh.cs New static class implementing hyperbolic tangent function with single value and vector overloads
Algorithms.Tests/Numeric/TanhTest.cs Unit tests covering single value computation with various test cases including edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 10, 2025 09:41
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 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.87%. Comparing base (ef3f6e6) to head (1e43aaa).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #563      +/-   ##
==========================================
+ Coverage   96.85%   96.87%   +0.01%     
==========================================
  Files         289      290       +1     
  Lines       11903    11920      +17     
  Branches     1717     1720       +3     
==========================================
+ Hits        11529    11547      +18     
  Misses        237      237              
+ Partials      137      136       -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.

Copilot AI review requested due to automatic review settings November 10, 2025 09:56
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 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@khanhkhanhlele
Copy link
Contributor Author

@siriak can you check my pr

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 10, 2025 11:46
Copilot AI review requested due to automatic review settings November 10, 2025 11:46
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.

@siriak siriak merged commit aba01fb into TheAlgorithms:master Nov 10, 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