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: The state of glibc libm


On Thu, 22 Mar 2012, Vincent Lefevre wrote:

> I initially thought that the only goal of a double-double format
> (instead of the standard quadruple precision) was to get an
> accurate implementation of the elementary functions in double
> precision (BTW, that's probably why expl() and so on didn't
> exist before C99).

I'd imagine the point is to be faster than pure software quad-precision 
floating point.

> Now, since expl() now exists, if the user calls it, perhaps his
> goal is to get more precision, so finally I agree that expl()
> should really have an accuracy close to LDBL_MANT_DIG. However
> this is quite useless in portable programs, where long double
> can have the same precision as double (as this is the case on
> ARM).

(FWIW, the ABI for AArch64 - ARMv8 in 64-bit mode - uses quad precision 
for long double.)

> For the same reason, if the user chose long double instead of
> double, this may be because he wanted more precision than double.

You mean range?  IBM long double provides more precision, but not more 
range.

> So, in the long term, the ABI should probably be changed to have
> long double = quadruple precision (binary128).

The ABI for Power Architecture changed away from quad precision to using 
IBM long double (the original SysV ABI for PowerPC used quad precision, 
the current ABI uses IBM long double)....

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