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

    <tr>
        <th>Summary</th>
        <td>
            [libc][math] should `fmod(-NAN,-NAN) = +NAN`?
        </td>
    </tr>

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

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

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

<pre>
    Following up on #61092, the report seems to indicate that `fmod(-NAN,-NAN) = +NAN` is a problem.

Is this wrong? I can't tell from 7.12.10.1.3 or F.10.7.1 what the behavior for two NaN arguments should be. 

We seem to match [glibc](https://github.com/bminor/glibc/blob/cf11e74b0d81d389bcad5cdbba020ba475f0ac4b/math/libm-test-fmod.inc#L136) on this. 

This behavior still happens and [is already tested for](https://github.com/llvm/llvm-project/blob/main/libc/test/src/math/FModTest.h#L151), just a question of if we have the semantics correct? 

Tagging @nickdesaulniers and @michaelrj-google. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk8-OpDYQh5_GXEqNTBka-sBhZltIKyV9Wiln_ynAE2N3bDOtffvIdCaTOSW5YEBWub7P9ZMp2cUTjax7Zd21knteQxwnJ72x3lYqmJ_jFJwLD-sX2O8QPDAU54ZfkOE3yCtBpHuIGRLRliAHsN5YLTNBXmUGdubzFgzD4XR7uTH89lwuwMQVGL6WrzMHm0DCPQblaKsZvzL-8nx-T5BXm-ARg1-YmOA7aOkZ9hkyOQdzDBv0dYN1w-umFhAiTOW9rxt4lA5Kj4pW-W5DhDlEyI8AN3kDGZd9I58TpDXszoCiGv559m90UBWoTWa9AuteF2eVZt2V4bDmfE9MvDCcGE6Lzeuuah02hpParA-x_D2246RcUAwnPTcN9a3iZmiMGC5KS9Npo5TkyJVs-27mUrdl6ybzynByVm2nTCmfisbaes1Q_NKIc3EY_CHna9c_iq6_gVO2zsEq73fyCaQ3BaLYdpGk-QmlNJni5V-hnHv_WE73GN5I50-yTVr_bLfglqoMpxT1J8n0azA_KOV6PQi6huGlzNDbnjJI-GOnlG3wEGawMzwIVvlOx-0l2qTPVifQIcZyrJi-IstlKQPKWu6t_t1QkrvzluJfxC3frF4lufh2WkJYHNVQmVGYi7jIisambwTybhBDtY6aUHc9DvMwt7oTgvpLPwsUjeTYtq2u7IgcW942XTMILoa6460xXU-6Rd4354G1nDZpXV1U1SEulU1pp3EY-h4rJxW5dEQO8ekLS_jieJhV-5JYy51NOX0WyDa7I6Yf49e9Hlq768fw_regMTFVe3Tj_77mgyAxnA6IPwMAAP__pOZPNg">