Question

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;
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top