<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/124812>124812</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc][math] Fix signaling nans and floating point exceptions for some math functions.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            lntue
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lntue
      </td>
    </tr>
</table>

<pre>
    The following issues with signaling nans and floating point exceptions are reported by @zimmerman6 with the CORE-MATH test suites:
```
CORE_MATH_CHECK_STD=true LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libllvmlibc.a ./check.sh $f

atan2
Running worst cases check in --rndn mode...
Missing inexact exception for x=0x0.0000000000001p-1022 y=0x1p+0 (z=0x0.0000000000001p-1022)

atan2f
Running worst cases check in --rndn mode...
Missing invalid exception for x=nan y=0x1p+0

exp
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=fff0000000000001

exp10
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=fff0000000000001

exp2
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=fff0000000000001

log
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=7ff0000000000001

log10
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=7ff0000000000001

log1p
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=7ff0000000000001

log2
Running worst cases check in --rndn mode...
Error, foo(sNaN) should be qNaN, got sNaN=7ff0000000000001

pow
Running worst cases check in --rndn mode...
Error, foo(sNaN,1.0) should be qNaN, got sNaN=7ff0000000000001

powf
Running worst cases check in --rndn mode...
Error, foo(sNaN,x) should be qNaN, got sNaN=7f800001
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzEldFvmzoUxv-aw8tRkDGQkgceklDUq3vbK3V9rwyY4NXYzDZN2r9-Mkm7VmukZauyKALp8_H5PhvLP2at2CjOc0hXQKlUbuRAKaRFwEbXaZNPUlDp5im_6zi2Wkq9FWqDwtqRW9wK16FvwqRXFVMWmWqwlZo5rwxaKId8V_PBCe1HDUfDB20cb7B6QkjIs-h7bnqm5vt-ruO4_v_2cna9vLtCx61DOwrHLcRLIEuYk8OfLH3ZvS-7X19drv-9_3JXQFw4M3L875_VNcQF0FLqmslG2Aeg5YuXl-VjPxuM_sprB7SsRiEboOVBsb5CVPX-tX_6GV4LGYZAy7rj9UNoOwSatD4YWTLHFAWyvB2V8svfamMd1sxyi1M5CoWzmVGNwl43PAxDIMtrYe20qYrvWP1mu7DVBncQF2RHQvLmFw2ziFCKT9NYNABdEQSaPR-vBbp4k7H9g5CPTIrmg5CKqXeB9nZ8N5zsdWmMNkDX2GoNNLM37AboAm2nR9lgxfHbpKxxox1Oo3HRtu27Vb-6R-Tv-p9-Hj7PXurNWdwvjrmfafOP-5_n8B31P8_H_9h-0NvPcV9HIfn9DKdfNR-H2P1ChOzV-gUSQZPHzSJesIDn0UWckWxBF2nQ5dmcRRcZqbOIzedx2vJkkcRVwlrekrriaSBySmhKIppFWZykSViRZN5GcRq3PGqSmkBCeM-EDD0XQm02wUTFPKJJFtFAsopL-8LWCSUTWk0-kacaNxYSIoV19kcHJ5yceDxNSAtIVz1zHaQFlmJ3Gmr9vWx1z9F3wHZU9aSHwWhk3jk3TEClJdByI1w3VmGt-wMYf-bjnvhAy8PyHnP6PQAA__-6LpMW">