#include int main() { union IEEE754SinglePrecisionFloat // Warning! non-portable code { float f; struct { unsigned mantisse : 23; unsigned exponent : 8; unsigned sign : 1; } bits; } x; // ... f == pow(-1, sign) * mantisse * pow(2, exponent-127) x.bits.sign = 1; x.bits.exponent = 130; x.bits.mantisse = 0x10000; float y = x.f; // -8.0625 ??? std::cout << y << '\n'; }