This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Optimized generic expf and exp2f


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]