The Picomath project holds some reusable math functions inspired by John D. Cook's Stand-alone code for numerical computing, including:
- Error function
- Phi (standard normal CDF)
- Phi inverse
- Gamma
- Log Gamma
- exp(x) - 1 (for small x)
- log(n!)
These functions are implemented in an impressive list of languages: Ada, C++, C#, D, Erlang, Go, Haskell, Java, Javascript, Lua, Pascal, Perl, PHP, Python (2.x and 3.x), Ruby, Scheme, and Tcl.
And now Factor!
You can find the code (and a bunch of tests) for this on my Github.
No comments:
Post a Comment