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: soft-fp: Make extensions of subnormals from XFmode to TFmode signal underflow if traps enabled


On Wed, 8 Oct 2014, Carlos O'Donell wrote:

> On 09/17/2014 05:35 PM, Joseph S. Myers wrote:
> > This patch fixes a soft-fp corner case I previously noted in
> > <https://sourceware.org/ml/libc-alpha/2013-10/msg00349.html>: when
> > trapping on underflow is enabled, extensions of subnormals from XFmode
> > to TFmode need to signal underflow because the result is tiny (but
> > exact, so the underflow flag is not raised unless trapping is
> > enabled).
> 
> Slightly unrelated, but why isn't everything using TFmode?
> What benefit is there to XFmode?

As a hardware floating-point format, I expect XFmode is a lot faster (even 
if x87 floating point is probably slower than SSE), though I don't have 
any benchmarks comparing long double and __float128 on x86.  (And the fact 
that it's long double - on x86 / x86_64 / ia64 - whereas TFmode is 
__float128 - no doubt also means it's much more widely used.  And so far 
getting libm functions and string conversions for __float128 requires you 
to use libquadmath shipped with GCC.  __float128 support in glibc was 
previously rejected in 
<https://sourceware.org/ml/libc-alpha/2004-03/msg00326.html> and 
<https://sourceware.org/ml/libc-alpha/2004-05/msg00055.html>, but now 
there are proposed standard C bindings for a _Float128 type with IEEE 
binary128 format - draft TS 18661-3 - so I think it makes sense to revisit 
the principle of adding such support to glibc now the standard bindings 
exist.)

-- 
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]