My solutions for the first homework of the Numerical Recipes in Astrophysics course offered in winter of 2019 at the Leiden Observatory.
To get the outputs, type "sh run.sh" in the command line while in this directory after it has been downloaded on one of the pczaal computers.
This homework included developing the following routines:
1.) A Poisson distribution mindful of not taking too much memory for large values of (lambda, k).
2.) Random number generator using a combination of (M)LCG and a 64-bit XOR-shift.
3.) Integration using Simpson's method.
4.) Linear and cubic spline interpolation in log-log space.
5.) Differentiation using Ridders' method.
6.) Rejection sampling to create N satellites with an appropriate radial distribution in spherical coordinates.
7.) Root-finding algorithm using Newton-Raphson method.
8.) Finding percentiles using a mergesort algorithm.
9.) Trilinear interpolation.
10.) Finding a global minimum in 3D space using the simplex method (needs work).