Boost logo

Boost Users :

From: Stefano Gragnani (stefano.gragnani_at_[hidden])
Date: 2021-07-22 10:36:59


thanks now everything begins to be more understandable

Inviato da iPad

> Il giorno 21 lug 2021, alle ore 23:40, John Maddock via Boost-users <boost-users_at_[hidden]> ha scritto:
>
> On 21/07/2021 19:07, Stefano Gragnani via Boost-users wrote:
>> further clarification if possible:
>>
>> why the 2 lines that don't compile:
>>
>> // float128 e1 = exp(1.Q); // Note argument to exp is type float128.
>> // std::cout << e1 << std::endl; // 2.71828182845904523536028747135266231
>>
>> if i put them in the following code compile regularly?
>
> You're mixing up 2 different things:
>
> * If you want to use __float128 "as if" it were no different to float/double etc, then include boost/math/cstdfloat.hpp
>
> * If you want a 128-bit floating point type which hides the underlying implementation then use boost/multiprecision/float128.hpp.
>
> Note that these are completely different approaches to the same problem, and are completely different types.
>
> Also note that strictly speaking, boost/math/cstdfloat.hpp is NOT C++ conformant, as it adds function overloads directly to namespace std.
>
>
>
>
> --
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net