Convert isNan/isInfinite into generic functions, add compile-time float path
Replace BMASK with a computed clear mask