Add derivative support for std::beta and introduce digamma function utility#1733
Open
leetcodez wants to merge 1 commit intovgvassilev:masterfrom
Open
Add derivative support for std::beta and introduce digamma function utility#1733leetcodez wants to merge 1 commit intovgvassilev:masterfrom
leetcodez wants to merge 1 commit intovgvassilev:masterfrom
Conversation
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
8c22bde to
b2b5388
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
vgvassilev
reviewed
Feb 18, 2026
| // CHECK-NEXT: return _t0.pushforward; | ||
| // CHECK-NEXT: } | ||
|
|
||
| double f_beta(double x, double y) { return std::beta(x, y); } |
Owner
There was a problem hiding this comment.
We need to also properly update test/Features/stl-cmath.cpp
b2b5388 to
3634001
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
3634001 to
9566db9
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
vgvassilev
reviewed
Feb 19, 2026
| namespace std { | ||
| template <typename T> | ||
| inline T beta(T x, T y) { | ||
| return std::tgamma(x) * std::tgamma(y) / std::tgamma(x + y); |
Owner
There was a problem hiding this comment.
We need to update the description on the top of this file accordingly.
Contributor
Author
There was a problem hiding this comment.
I have updated the file description!
9566db9 to
191e0c5
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Owner
|
@guitargeek, can you take a look at this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a digamma utility to into BuiltInDerivatives.h It handles the math using a standard asymptotic expansion and uses a recurrence shift for smaller values of x to ensure the floating-point results stay accurate.
implemented beta_pushforward and beta_pullback.