add more mathematical functions to the standard library
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Issue by vks
Friday Sep 05, 2014 at 04:27 GMT
For earlier discussion, see https://github.com/rust-lang/rust/issues/17007
This issue was labelled with: A-libs, I-enhancement in the Rust repository
The following special functions are essential for basic statistics. See [1] for an argumentation why they should be included in any standard library. They are implemented in the Cephes library [2]:
/* Regularized incomplete beta function */
double incbet(double a, double b, double x);
/* Inverse of incomplete beta integral */
double incbi(double a, double b, double y);
/* Regularized incomplete gamma integral */
double igam(double a, double x);
/* Complemented incomplete gamma integral */
double igamc(double a, double x);
/* Inverse of complemented incomplete gamma integral */
double igami(double a, double p);
/* Normal distribution function */
double ndtr(double x);
/* Inverse of Normal distribution function */
double ndtri(double y);
/* Bessel function of non-integer order */
double jv(double v, double x);
We could just link against Cephes, the library is very stable and changes only every few years. The license is not specified in the distribution or on the website, however the author of the library has agreed to distribute Cephes using the BSD license in the past. [3]
(For more special functions that could be implemented see [4], however that might be to extensive.)
[1] http://www.evanmiller.org/statistical-shortcomings-in-standard-math-libraries.html
[2] http://www.moshier.net/#Cephes
[3] https://lists.debian.org/debian-legal/2004/12/msg00295.html
[4] http://open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1422.html
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reading the earlier discussion in issue #17007 and the linked Cephes and licensing references, then check the Rust standard-library contribution process. Done means there is a decided, documented path for adding the requested mathematical functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100