in reply to integer container for float

Just a side note which probably won't help you any: there's a problem with your C code, too.

In modern C, one cannot access an object via pointer of incompatible type#1. This is called type punning and it violates aliasing constraints. You can still compile such code with -fno-strict-aliasing, but this is a poor practice. Going via union is to be preferred.

#1 excepting character type—one may inspect the stored representation of any object through (unsigned char *).