Description
Proposal
Problem statement
The f32
/f64
APIs are missing some useful functions, namely erf
and erfc
, such as in libm
(where the current gamma
function is from I believe) or the C++ Faddeeva library.
Motivating examples or use cases
The error function is used in numerous areas of scientific computing, such as statistics where the CDF of the Normal Distribution can be written in terms of it:
Solution sketch
As far as I can tell, the float functions are already from the libm crate, and erf
, erfc
have just been skipped for some reason.
Alternatives
There are obviously multiple ways to implement integrals numerically, but if the gamma function from libm was good enough, I don't see why the error function wouldn't be.
Another alternative is to port the Faddeeva library from C++ (released under an MIT licence).