質問

I know about boost/cstdint.hpp for integer types.
Is there anything similar for floating point data types ?

I want to port IPP data types to boost or any other standard library, so that clients of my library does not depend on IPP which uses following typedefs:

typedef float   Ipp32f;
typedef double  Ipp64f;
役に立ちましたか?

解決

Since version 1.53 Boost provides the library multiprecision. Besides others, they also offer floating point types that have more range and precision than the built in types.

If you want to reduce the dependencies, you will probably want to look into cpp_dec_float<N>. But it's worthwhile to take a deeper look yourself.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top