[libc][math] Correct tanhf16 subnormal rounding and range reporting (#236480)
Select correctly rounded tanhf16 results for nonzero half subnormals and
signed minimum-normal inputs. Preserve signed zero and report inexact,
with
underflow/ERANGE when the rounded result is tiny.
Tests: smoke tests with GCC 13 and Clang 18 on x86-64 Linux, plus MPFR
4.2.1
value checks over all 63,488 finite half encodings in four rounding
modes.
Reporting checks cover nonzero subnormals and four adjacent boundary
encodings using tininess after rounding, separately from MPFR's
underflow flag.
Assisted-by: GitHub Copilot
Signed-off-by: sriramshastry <sriramshastry@gmail.com>