Add elementary naninf support

This does not include debugging, unfortunately