]> git.ipfire.org Git - thirdparty/glibc.git/commit
Improve NaN payload testing
authorJoseph Myers <josmyers@redhat.com>
Wed, 4 Sep 2024 13:20:18 +0000 (13:20 +0000)
committerArjun Shankar <arjun@redhat.com>
Fri, 27 Sep 2024 15:25:43 +0000 (17:25 +0200)
commit63bcc017446d14e64aed8511845400fc661f2828
tree16577e87f94996f07064df835a57d35e2e1dd1fb
parent86369c9ee4d200527e85d240fa0ee081fdb9fb4c
Improve NaN payload testing

There are two separate sets of tests of NaN payloads in glibc:

* libm-test-{get,set}payload* verify that getpayload, setpayload,
  setpayloadsig and __builtin_nan functions are consistent in their
  payload handling.

* test-nan-payload verifies that strtod-family functions and the
  not-built-in nan functions are consistent in their payload handling.

Nothing, however, connects the two sets of functions (i.e., verifies
that strtod / nan are consistent with getpayload / setpayload /
__builtin_nan).

Improve test-nan-payload to check actual payload value with getpayload
rather than just verifying that the strtod and nan functions produce
the same NaN.  Also check that the NaNs produced aren't signaling and
extend the tests to cover _FloatN / _FloatNx.

Tested for x86_64.

(cherry picked from commit be77d5ae417236883c02d3d67c0716e3f669fa41)
math/test-nan-payload.c