Stand-alone code for numerical computing

Sometimes you need a little code to do some scientific computing and you don't want to take on a dependence to a huge and possibly unfamiliar library. This page is an index to code snippets in multiple languages that solve that problem.

The software listed here has been designed to minimize dependencies, minimize complexity, and maximize transparency. That sometimes means sacrificing efficiency.

All code here is in the public domain. Do whatever you want with it, no strings attached. Use at your own risk.

I'm just getting started with this project. I intend to add functions and programming languages over time. Feedback is always appreciated.

 

Special functions

Error function: C++, Python

Phi (standard normal CDF): C++, Python

Phi inverse: C++, Python

Gamma: C++, Python

Log Gamma: C++, Python

log(1 + x): C++, Python

 

Random number generation

Normal: C++, Python

Exponential: C++, Python

Gamma: C++, Python

Poisson: C++, Python

Student-t: C++, Python

Cauchy: C++, Python

 

Miscellaneous

Distance based on longitude and latitude: JavaScript, C++, Python

 

Home | Sitemap | My blog | Search