This is my first post. I’m mainly working on ESP8266 and ESP32. For the ESP32 I’m using the esp-idf FREERTOS environment. I did already some test projects and now figured out that there is a stdint.h and a stdbool.h but no stdfloat.h which includes the float32_t. I’m wondering that this is not available, does someone have an explanation why?
I think the reason is that we know exactly what an int32_t is: 32 bits representing an integer value in a specific way; endianness may differ, but that’s it.
But what is a float32_t? Yes, it’s 32 bits. Now, how many of these are devoted to the mantissa and the exponent? Does the representation even use the sign-exponent-mantissa format? Are there special values for not-a-number or infinity? How are these represented?
So float32_t is a rather hazier concept than int32_t.
Nonetheless, a proposal has been submitted to both the C and the C++ standardization committees to add a new header to the Standard Libraries with typedefs just like those you are talking about.
The general feeling on the C++ end of things is that C should lead in these matters, and C++ will follow. But the C committee does not seem to be doing anything about it, as far as I can tell.