Skip to content

feat: add C implementation for @stdlib/stats/base/dists/lognormal/logpdf#10881

Open
rautelaKamal wants to merge 3 commits intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/lognormal/logpdf-c-port
Open

feat: add C implementation for @stdlib/stats/base/dists/lognormal/logpdf#10881
rautelaKamal wants to merge 3 commits intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/lognormal/logpdf-c-port

Conversation

@rautelaKamal
Copy link
Contributor

Description

What is the purpose of this pull request?

This pull request:

  • Adds a C implementation for evaluating the natural logarithm of the probability density function (PDF) of a lognormal distribution (@stdlib/stats/base/dists/lognormal/logpdf), and includes the corresponding native N-API bindings following the DDD_D pattern found in similar modules like arcsine/logpdf.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

AI Assistance Disclosure

  • Yes
  • No

If yes, how was AI used?
I used an AI assistant to help stub out the initial C boilerplate (header files, build configurations) and to mirror the JS test suite into native tests, which I then carefully reviewed and validated against stdlib guidelines before submitting.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Mar 11, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Mar 11, 2026

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/lognormal/logpdf $\color{green}323/323$
$\color{green}+100.00%$
$\color{green}23/23$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}323/323$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@rautelaKamal rautelaKamal marked this pull request as draft March 12, 2026 00:41
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Mar 12, 2026
- Add standalone C implementation using ln, pow, PI constants
- Add native.js binding, header, addon.c, Makefile, binding.gyp
- Add test.native.js, benchmark.native.js with variable sorting
- Add benchmark.js with len variable to fix max-len eslint rule
- Update package.json and manifest.json

Signed-off-by: Kamal Singh Rautela <e22cseu1624@bennett.edu.in>
@rautelaKamal rautelaKamal force-pushed the feat/stats/base/dists/lognormal/logpdf-c-port branch from 6f8590a to da83153 Compare March 12, 2026 11:38
Signed-off-by: Kamal Singh Rautela <e22cseu1624@bennett.edu.in>
Signed-off-by: Kamal Singh Rautela <e22cseu1624@bennett.edu.in>
@rautelaKamal rautelaKamal marked this pull request as ready for review March 12, 2026 15:32
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Needs Review A pull request which needs code review. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants