Speedup of NaN/INF check
Merge pull request #9 from iainrb/devel

Speedup of NaN/INF check