use qIsNaN instead of isnan (fixes windows build)