Fix undefined behavior in matrix_cwise test for signed integers
Summary
- Clamp
std::numeric_limits<Scalar>::min()beforecwiseAbs()for signed integer types - For
int8_t,abs(-128) = 128overflows back to-128, thencwiseSqrt(-128)is UB - Detected by clang UBSan on s390x, silent on x86
Test plan
-
matrix_cwisetest suite passes - No UB with signed char min value
Closes #2933 (closed)