This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Optimized generic expf and exp2f
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>, <nd at arm dot com>
- Date: Thu, 7 Sep 2017 14:48:25 +0000
- Subject: Re: [PATCH] Optimized generic expf and exp2f
- Authentication-results: sourceware.org; auth=none
- References: <59AED6DA.6000509@arm.com> <alpine.DEB.2.20.1709052014180.6352@digraph.polyomino.org.uk> <20170907100341.47a23955@keller>
On Thu, 7 Sep 2017, Gabriel F. T. Gomes wrote:
> On Tue, 5 Sep 2017 20:45:44 +0000
> Joseph Myers <joseph@codesourcery.com> wrote:
>
> >On Tue, 5 Sep 2017, Szabolcs Nagy wrote:
> >
> >> +static inline int
> >> +ieee_2008_issignaling (float x)
> >> +{
> >> + uint32_t ix = asuint (x);
> >> + ix ^= 0x00400000; /* IEEE 754-2008 snan bit. */
> >> + return 2 * ix > 2u * 0x7fc00000;
> >> +}
> >
> >This doesn't seem to be used, but if you need issignaling tests in future
> >functions (powf?), you need to respect HIGH_ORDER_BIT_IS_SET_FOR_SNAN from
> >nan-high-order-bit.h.
>
> Is that also valid for _Float128 (meaning that test-math-issignaling.cc
> needs to check for that, as well)? It was my understanding that it isn't.
This applies just as much to _Float128. test-math-issignaling.cc only
does _Float128 tests in the __HAVE_DISTINCT_FLOAT128 case, which does not
apply to any architectures using the other NaN convention, so there is no
problem with that test, but once we support _FloatN/_FloatNx types that
are ABI-aliases of other types, MIPS64 _Float128 / _Float64x will follow
the same NaN convention as long double that those types alias (with which
convention that is depending on the compiler configuration).
--
Joseph S. Myers
joseph@codesourcery.com