The NAG library is a useful library of subroutines for inclusion in number-crunching computer programs. For example, there are NAG routines for generating random numbers and for solving equations numerically. The NAG library exists in both Fortran and C, for many flavours of Unix. In this context NAG is an acronym for Numerical Algorithms Group.