Fix vectorized calculations on POWER (#59382)
Summary:
This fixes multiple bugs introduced by the VSX optimized code in https://github.com/pytorch/pytorch/pull/41541
- min/max/clamp now consistently return nan when any value is NaN as on other architectures
- The non-complex angle functions return PI for negative values now
- The complex angle functions have been corrected and optimized
- The float32-log function implementation returned a wrong result when inf was passed (and maybe other inputs), replaced by the sleef function just as for float64
Fixes https://github.com/pytorch/pytorch/issues/59248
Fixes https://github.com/pytorch/pytorch/issues/57537
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59382
Reviewed By: jbschlosser
Differential Revision: D28944626
Pulled By: ezyang
fbshipit-source-id: 1ae2782b9e34e458a19cec90617037654279e0e0