[PATCH v3 4/5] math: Improve fmodf
Joseph Myers
joseph@codesourcery.com
Thu Mar 16 23:22:18 GMT 2023
On Thu, 16 Mar 2023, Adhemerval Zanella via Libc-alpha wrote:
> diff --git a/math/libm-test-fmod.inc b/math/libm-test-fmod.inc
> index 6d3cdda4fe..4b77b54736 100644
> --- a/math/libm-test-fmod.inc
> +++ b/math/libm-test-fmod.inc
> @@ -226,6 +226,11 @@ static const struct test_ff_f_data fmod_test_data[] =
> TEST_ff_f (fmod, -0x1p1023L, -0x3p-1073L, -0x1p-1073L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> TEST_ff_f (fmod, -0x1p1023L, 0x3p-1022L, -0x1p-1021L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> TEST_ff_f (fmod, -0x1p1023L, -0x3p-1022L, -0x1p-1021L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> +#else
> + TEST_ff_f (fmod, 0x1.3a3e6p-127, 0x1.8b8338p-128, 0x1.d1f31p-129, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> + TEST_ff_f (fmod, 0x1.3a3e6p-127, -0x1.8b8338p-128, 0x1.d1f31p-129, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> + TEST_ff_f (fmod, -0x1.3a3e6p-127, 0x1.8b8338p-128, -0x1.d1f31p-129, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> + TEST_ff_f (fmod, -0x1.3a3e6p-127, -0x1.8b8338p-128, -0x1.d1f31p-129, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
> #endif
These new tests should be valid for all formats supported by glibc, so not
restricted to TEST_COND_binary32 (which would be the effect of that
#else).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list