Skip to content

Fix #10940 - Add support for degenerate cases to gammaIncomplete and gammaIncompleteCompl#10943

Merged
thewilsonator merged 4 commits intodlang:masterfrom
tedgin:10940
Jan 31, 2026
Merged

Fix #10940 - Add support for degenerate cases to gammaIncomplete and gammaIncompleteCompl#10943
thewilsonator merged 4 commits intodlang:masterfrom
tedgin:10940

Conversation

@tedgin
Copy link
Contributor

@tedgin tedgin commented Jan 30, 2026

This satisfies #10940.

Previously gammaIncomplete hand inconsistent handling of a = 0 and real.infinity. This extends the handling of these two degenerate cases to all values of x >= 0. gammaIncompleteCompl was extended as well.

As part of this change, the NaN handling for these two functions was brought inline with the builtin infix operators, i.e., when both a and x are NaNs, the one with the larger payload is returned.

@tedgin tedgin requested a review from ibuclaw as a code owner January 30, 2026 22:58
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @tedgin! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#10943"

@0xEAB 0xEAB changed the title phobo#10940 Adds support for degenerate cases to gammaIncomplete and gammaIncompleteCompl Fix #10940 - Add support for degenerate cases to gammaIncomplete and gammaIncompleteCompl Jan 31, 2026
@0xEAB 0xEAB linked an issue Jan 31, 2026 that may be closed by this pull request
This is an attempt to pass the buildkite check to prevent having
package wide std.algorithm imports.
@thewilsonator thewilsonator merged commit 0c5c9e9 into dlang:master Jan 31, 2026
10 checks passed
@tedgin tedgin deleted the 10940 branch February 1, 2026 18:30
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.

Inconsistent treatment of s=0,∞ by gammaIncomplete(s, x)

3 participants