The Endeavor is one of my favorite non aviation blog. Daily posts on this blog, which make there way to my email everyday, are the randomness that I have learned to like.
When John D Cook, introduced Julia in this blog post and generously shared the random number generator codes in Julia for probability distribution, I wanted to have them in Fortran.
I know, with the legacy of Fortran this functions might have already been defined, but hey I wanted to keep then in a module that I might use someday. So I just translated them in fortran and here’s the result.
The code can be found here: Fortran module for non-uniform random number generation.
The random number generators are for the following probability distributions:
- Chi square
- Inverse gamma
- Laplace (double exponential)
- Student t
You can download the fortran module on random distribution from here.