stdlib
stdlib copied to clipboard
Probability Distribution and Statistical Functions -- Gamma Distribution Module
This is the second round of probability distribution and statistical functions, continuing from #240. Since the whole modular structure has been changed, each distribution will have its own PR. This PR contains gamma distributions. Files uploaded are:
- src/stdlib_stats_distribtuion_gamma.fypp
- src/CMakeLists.txt
- src/tests/test_distribution_gamma.f90
- src/tests/CMakeLists.txt
- doc/specs/stdlib_stats_distribution_gamma.md
- doc/specs/index.md
Link to the open-access article on which this PR is based. P.369 (7/10) has a summary of the final algorithm.
This one is ready for review.
Compilation failed due to Build-API-Docs failure of other modules. Error message is AttributeError: 'FortranSubmoduleProcedure' object has no attribute 'module'. What does that mean?
@Jim-215-Fisher it looks related to the ford issue ford#466. Apart from that, this PR is LGTM. The only thing I'm unsure about it is: How was your approach to testing, and where did you get the expected output?
Thank you for the info. Regarding the testing, gamma random number is tested with common Pearson's chi-squared test, pdf and cdf were tested against results from scipy or excel formula with the same parameters.
@Jim-215-Fisher it looks related to the ford issue ford#466. Apart from that, this PR is LGTM. The only thing I'm unsure about it is: How was your approach to testing, and where did you get the expected output?