A Fortran 90 library for astronomical calculations