Convert isNan/isInfinite into generic functions, add compile-time float path