work on float as binary

To limit memory access, i need to pack 2 floats into a 32 bit word. To do so, i need a binary access to floats. I have tried diffferent things like :

float v = 7.5f; // my float value
unsigned int i32bitVal = (unsigned int)&v;

but it doesn’t work, the 0.5 is always lost. if i come back to float doing :

float v2 = (float)&i32bitVal;

then i have a v2 equal to 7.

Is there a way to work on float as a 32 bit value ? Is there a memory copy function ?

use the __int_as_float and __float_as_int functions

Thanks a lot !