Boost logo

Boost :

Subject: Re: [boost] [math] Support for libquadmath/ __float128
From: John Maddock (boost.regex_at_[hidden])
Date: 2013-02-21 13:55:45

>I have experimented with the quadmath library included with gcc and the
> library and encountered several problems.
> - typeid is seemingly not supported for __float128, which requires an
> overload of nameof<__float128>
> - the stream extraction operator has to be provided for __float128 for
> string conversion to work
> - a specialisation of numeric_limits has to be provided.
> Is there an interest in incorporating __float128 into boost ? If so, would
> it be a good idea to
> specialise constants for __float128 as well, apart from float, double and
> long double?

Funnilly enough I wondered about this the other day, but haven't had the
time to do anything about it. Plus I've rather been hoping that the GCC
guys would make __int128 and __float128 first class citizens and render the
issue moot ;-)

An open question is whether we should add a "binding" header under
boost/math/bindings or whether it would be better to wrap __float128 and
libquadmath as a multiprecision type under boost/multiprecision.

The latter option has the advantage that we don't have to pollute the global
namespace with std lib overloads for __float128.

Of course a simpler solution is possible if you just want the numeric
constants working for __float128, but it would be nice to make the type a
first class C++ type that interoperates with all of Boost.Math.


Boost list run by bdawes at, gregod at, cpdaniel at, john at