This is the mail archive of the
mailing list for the GCC project.
Re: The state of glibc libm
On Mon, 2012-03-26 at 12:26 +0200, Vincent Lefevre wrote:
> On 2012-03-22 16:29:00 +0000, Joseph S. Myers wrote:
> > On Thu, 22 Mar 2012, Vincent Lefevre wrote:
> > > 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.
> Well, precision and/or range. If double precision format is sufficient
> for his application, the user can just choose the "double" type. So,
> I don't think that it is useful to have long double = double.
> Then concerning double-double vs quad (binary128) for the "long double"
> type, I think that quad would be more useful, in particular because
> it has been standardized and it is a true FP format. If need be (for
> efficiency reasons), double-double could still be implemented using
> the "double" type, via a library or ad-hoc code (that does something
> more clever, taking the context into account). And the same code (with
> just a change of the base type) could be reused to get a double-quad
> (i.e. quad + quad) arithmetic, that can be useful to implement the
> "long double" versions of the math functions (expl, and so on).
This is much easier said then done. In practice it is a major ABI change
and would have to be staged over multiple (7-10) years.
> > > 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)....
> Perhaps they could change back to quad precision.
That is not the feedback we get from our customers. No one will use
software IEEE binary128 and we don't have hardware binary128. So far
there is abstract interest but no strong demand for this. So there is no
incentive to change.