-
-
Notifications
You must be signed in to change notification settings - Fork 868
feat: add C implementation for stats/base/dists/chi/logpdf
#4527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/stdlib update-copyright-years |
Signed-off-by: Aadish Jain <jain.aadishj@gmail.com>
Coverage Report
The above coverage report was generated for the changes in this PR. |
- Fixed header include order in addon.c - Removed cppcheck suppress directive - Updated benchmark to use uniform instead of randu - Fixed spacing in benchmark function call - Added return 0 in C example - Adjusted test tolerance for C implementation precision
Based on analysis of floating-point precision differences between JS and C implementations. The 40 EPS tolerance accounts for accumulated rounding errors in complex calculations involving ln and gammaln functions.
Explains why 40.0 EPS tolerance is needed due to accumulated floating-point precision differences in complex calculations involving ln and gammaln functions.
Changed printf format from 'logf(x;k)' to 'ln(f(x;k))' to match standard mathematical notation for natural logarithm of PDF.
- Changed printf format from 'logf(x;k)' to 'ln(f(x;k))' for consistency - Added missing 'return 0;' statement in C example
lib/node_modules/@stdlib/stats/base/dists/chi/logpdf/benchmark/c/benchmark.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/chi/logpdf/examples/c/example.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
lib/node_modules/@stdlib/stats/base/dists/chi/logpdf/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ready now.
/stdlib merge |
/stdlib lint-autofix |
@Planeshifter, the slash command failed to complete. Please check the workflow logs for details. |
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
PR Commit Message
Please review the above commit message and make any necessary adjustments. |
Resolves #3492.
Description
This pull request:
Related Issues
This pull request:
@stdlib/stats/base/dists/chi/logpdf
#3492Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers