I don't think this particular example works though
(?),
but perhaps something similar could?
Guess it would work to add all elements in the array,
and see if the result is inf or nan. That operation sounds
likely to be automatically vectorized by the c compiler...