[PATCH 11/15] math: Fix acos template for arguments greater than 1
Joseph Myers
josmyers@redhat.com
Wed Mar 27 19:04:33 GMT 2024
On Wed, 27 Mar 2024, Adhemerval Zanella Netto wrote:
> And I think it is unrelated to gcc PR95115 because x86_64/i686 will use
> and specific sysdeps/i386/fpu/e_acosl.c that explicit does not handle this
> input case for overflow exceptions. For shared build this case is
> handle by w_acosl_compat.c:
>
> if (__builtin_expect (isgreater (fabsl (x), 1.0L), 0)
> && _LIB_VERSION != _IEEE_)
> {
> /* acos(|x|>1) */
> feraiseexcept (FE_INVALID);
> return __kernel_standard_l (x, x, 201);
> }
The compat code is dealing with the possibility of SVID exceptions, which
isn't relevant here.
> And that's why I though following the same logic on template would be
> better. But I think maybe we should fix on x86_64 implementation instead.
Yes, we should fix the x86_64 implementation.
Such issues in dbl-64, flt-32 or ldbl-128 sources would largely have been
fixed (modulo compiler bugs) when we started adding new architectures
after new architectures stopped using the compat wrappers - but any issues
for ldbl-128ibm, ldbl-96 or architecture-specific sources wouldn't have
been detected then.
--
Joseph S. Myers
josmyers@redhat.com
More information about the Libc-alpha
mailing list