# Is there a header that provides types similar to uint64_t for floats and doubles on Linux or gcc?

2 answers

While C has no IEEE-754 floating point mandate, for all intents and purposes, it is as versatile as 2's complement arithmetic.

Under this assumption, the header `<float.h>`

contains the definitions of the macros: `FLT_MANT_DIG`

and `DBL_MANT_DIG`

is the number of bits in the mantissa. The value (24) denotes a 32-bit, IEEE-754 single-point floating point type. The value (53) means double-precision 64-bit type.

Note, however, that the types "float" and "double" can be the same, even with a matching IEEE-754 implementation. "long double" types are often aliases for "double" types on many platforms.

+2

source to share