Code is taken from www.netlib.org/slatec/ and (for the checks makefile) http://surf.ml.seikei.ac.jp/~nakano/linux/FortLib-e.html