Daniel Minor changes to main.c and header file. Implemented a check against asin NAN errors.