Repository navigation
Conversation
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: skipped
- task: lint_markdown_pkg_readmes
status: na
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Member
|
@anandkaranubc Would you mind taking a first look at this? Cheers! |
This branch has not been deployed
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.
Resolves #16533.
Description
This pull request:
xasymptotic series used bymath/base/special/gammainc. The expansion is1 + (a-1)/x + (a-1)(a-2)/x² + ..., so the falling factorial has to start ata-1(Boost doesa_poch( a - 1 )), but both the JS and C implementations started ata.gammaincand forpoisson/cdfandchisquare/cdf, which are affected through it. The existing fixtures pass with or without the fix, which is why this went unnoticed.Related Issues
This pull request has the following related issues:
math/base/special/gammaincis off by up to 0.03 for x > 1000 when a is close to x #16533Reference Packages
This pull request followed these packages:
Questions
No.
Other
gammainc( 1367.3436948118986, 1409.203708740708 )0.099521190516424380.131904991898572970.13190499189857088gammainc( 1001, 1000.5, true, true )0.5018509988825920.489491914600244660.48949191460024505cdf( 999, 1001 )0.495301555334109740.483188547070212640.4831885470702138cdf( 2500, 2400 )0.92315004326087190.92412708845719180.9241270884571916The new tests fail on the unfixed code and pass with the fix, for both the JS and native implementations (I rebuilt the three add-ons with and without the C change).
I also compared against SciPy on 20,000 points (
xfrom 1e3 to 1e6,anearx). Points with a relative error above 1e-8 went from 13,130 to 40. The remaining 40 are aroundx ≈ 975000, with a worst relative error of 4.68e-6. I haven't looked into those, and they may be a separate issue.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
@stdlib-js/reviewers