Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
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: passed
- task: lint_markdown_pkg_readmes
status: passed
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: passed
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: missing_dependencies
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- task: lint_c_examples
status: missing_dependencies
- task: lint_c_benchmarks
status: missing_dependencies
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
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.
Progresses #9892.
Description
This pull request:
@stdlib/math/base/special/besselk1, which computes the modified Bessel function of the second kind of order one, K₁(x), with JavaScript, C, and Node-API implementations.This is the companion to
besselk0(#16981), following the suggestion in #9892 to start with orders zero and one. The two packages are independent, so they can be reviewed in either order.The implementation is a port of the double-precision (53-bit) branch of Boost's
bessel_k1.hpp:x <= 1,R2(x²) * x + 1/x + ln(x) * a, wherea = ((R1(t) + Y1) * t² + t/2 + 1) * x/2andt = x²/4;x > 1,(Y3 + R3(1/x)) * exp(-x) / sqrt(x), with the exponential split into two halves forx >= ln(DBL_MAX)to avoid premature underflow.Boost writes
Y1andY3asfloatliterals; both values are exactly representable in single precision, so the double-precision constants used here are identical. Special cases:NaNforx < 0orNaN,+Infinityforx = ±0, and0forx = +Infinity. Since K₁(x) ~ 1/x as x → 0, the result overflows to+Infinityfor0 < x < 1/DBL_MAX(~5.6e-309), which includes all subnormal inputs.Related Issues
This pull request has the following related issues:
besselk) #9892math/base/special/besselk0#16981 (besselk0)Reference Packages
This pull request followed these packages:
math/base/special/besselk0(feat: addmath/base/special/besselk0#16981)math/base/special/bessely1math/base/special/besselk0, which was itself scaffolded frommath/base/special/bessely0bessel_k1.hpp(all 34 coefficients were checked programmatically against the Boost source); this order uses three rational functions and no plain polynomialmpmathvalues on 20,000 log-uniform random points in[1e-300, 745], the maximum relative error is 1.55 ε (98.4% of cases within 0.5 ε). Against the SciPy (scipy.special.k1) fixtures, the maximum difference is 4 ULP. Test tolerances are set one ULP above the measured maximum per range5.0e-324,1.0e-310, and5.0e-309return+InfinityQuestions
Same as in #16981: are SciPy-generated fixtures acceptable, or would you prefer Julia fixtures (
SpecialFunctions.besselk( 1, x )) as in the other Bessel packages?Other
Ran locally: package tests (JS and native, 6,512 assertions each),
examples-c,benchmark-c, the JS examples, and the JavaScript, Markdown, TypeScript declaration,repl.txt, EditorConfig, and license-header linters, pluspylint(withetc/pylint/.pylintrc),pycodestyle, andpydocstyleon the Python files. The only lint output isn/no-syncwarnings inscripts/, which are also present inmath/base/special/bessely0.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers