[PATCH v2] sysdeps/ieee754: Fix remainder sign of zero for FE_DOWNWARD (BZ #32711)

Joseph Myers josmyers@redhat.com
Wed Feb 19 17:06:13 GMT 2025


On Wed, 19 Feb 2025, Sergei Zimmerman wrote:

> +#if TEST_COND_binary32 || TEST_COND_binary64 || TEST_COND_binary128
> +    TEST_ff_f (remainder, 0x1.08001cp-2, 0x1p-24, plus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> +    TEST_ff_f (remainder, -0x1.003ffep-126, -0x1.8p-148, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> +    TEST_ff_f (remainder, 0x1.2c3224p+17, 0x1p-5, plus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> +#endif

I don't think the tests should be restricted by format like this.  
Rather, each test should apply for all formats for which it's valid (and 
these tests, since their values are representable in float and the results 
are exact, should be valid for all formats supported by glibc).

-- 
Joseph S. Myers
josmyers@redhat.com



More information about the Libc-alpha mailing list