feat: add C implementation for stats/base/dists/lognormal/cdf#10809
feat: add C implementation for stats/base/dists/lognormal/cdf#10809bhargava-d16 wants to merge 3 commits intostdlib-js:developfrom
stats/base/dists/lognormal/cdf#10809Conversation
Signed-off-by: Bhargav Dabhade <bhargava2005dabhade@gmail.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
status: passed
- task: lint_package_json
status: passed
- 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: passed
- task: lint_python
status: na
- 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: na
- task: lint_license_headers
status: passed
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
Neerajpathak07
left a comment
There was a problem hiding this comment.
@bhargava-d16 Overall this looks great. Just a few comments and nitpicks.
| static double benchmark( void ) { | ||
| double elapsed; | ||
| double sigma[ 100 ]; | ||
| double mu[ 100 ]; | ||
| double x[ 100 ]; |
There was a problem hiding this comment.
| static double benchmark( void ) { | |
| double elapsed; | |
| double sigma[ 100 ]; | |
| double mu[ 100 ]; | |
| double x[ 100 ]; | |
| static double benchmark( void ) { | |
| double sigma[ 100 ]; | |
| double mu[ 100 ]; | |
| double x[ 100 ]; | |
| double elapsed; |
Ordering by length
| x = uniform( 100, 0.1, 20.0, opts ); | ||
| mu = uniform( 100, -5.0, 5.0, opts ); | ||
| sigma = uniform( 100, EPS, 5.0, opts ); |
There was a problem hiding this comment.
Normally what we want to do is align the C benchmark ranges to the corresponding range values opted in JS benchmark. Maybe we can follow it here as well!!!
| x = uniform( 100, 0.1, 20.0, opts ); | ||
| mu = uniform( 100, -5.0, 5.0, opts ); | ||
| sigma = uniform( 100, EPS, 5.0, opts ); |
There was a problem hiding this comment.
Same comment here as well. You can align these ranges to the ones used in benchmark.js
| t.end(); | ||
| }); | ||
|
|
||
| tape( 'the function evaluates the cdf for `x` given positive `mu`', opts, function test( t ) { |
There was a problem hiding this comment.
nit: If possible could you pls modify these test cases to test against fixtures drawn from a singular json file namely data.json also to use isAlmostSameValue. This is also expected to be updated throughout the test files.
you can also take a look at:- https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/stats/base/dists/wald/pdf/test/test.pdf.js#L197
| for ( i = 0; i < 25; i++ ) { | ||
| x = random_uniform( 0.0, 10.0 ); | ||
| mu = random_uniform( -5.0, 5.0 ); | ||
| sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 5.0 ); |
There was a problem hiding this comment.
Corresponding JS example does not use eps in it's range values. Might be better to update it here as well.
Meaning you'll also have to update the documentation and the manifest eventually.
There was a problem hiding this comment.
Signed-off-by: Bhargav Dabhade <bhargava2005dabhade@gmail.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
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- 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: na
- task: lint_license_headers
status: passed
---
---
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
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: missing_dependencies
- 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
---
|
@Planeshifter I have made the suggested changes. Please let me know if any further changes are required. |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Resolves #3747
Description
This pull request:
Related Issues
This pull request has the following related issues:
@stdlib/stats/base/dists/lognormal/cdf#3747Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers