s390x: fix special_hermite_polynomial_h for '+/-inf' and '+/-nan' (#104705)
On s390x static cast may return big positive number, in that case uninitialized value of 'r' is returned. In case of +/-inf or +/-nan use -1 explicitely.
Also initialize 'r' to 0 in case 'n+n' overflows anyway.
This change fixes
test_vmap_exhaustive_special_hermite_polynomial_h_cpu_float32 from test/functorch/test_vmap.py on s390x.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/104705
Approved by: https://github.com/ezyang