Boost logo

Boost :

Subject: Re: [boost] [math] Support for libquadmath/ __float128
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2013-02-22 07:33:44

> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Claas
> Sent: Thursday, February 21, 2013 3:24 PM
> To: boost_at_[hidden]
> Subject: [boost] [math] Support for libquadmath/ __float128
> I have experimented with the quadmath library included with gcc and the boost::math::constants
> and encountered several problems.
> - typeid is seemingly not supported for __float128, which requires an overload of
> - 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
> constants for __float128 as well, apart from float, double and long double?

As John and Chris have observed already, it would be nicest to have proper compiler and platform
support for __float128, including numeric_limits, and/or full.

I'm not sure how to facilitate this but perhaps firstly users need to do more asking?

(It seems to take an inordinate length of time to get compilers and libraries to fully support
numeric_limits, especially

But meanwhile, have you considered using the cpp_dec_float (and cpp_int) types from
Boost.Multiprecision. A predefined 50 digit version is very easy to use, and a 40 digit version
almost as easy.

Of course, speed will not be nearly as good, but accuracy will be fine.


Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204

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