I have a structure
struct {
u32 var1 :7;
u32 var2 :4;
u32 var3 :4;
u32 var4 :1;
u32 var5 :4;
u32 var6 :7;
u32 var7 :4;
u32 var8 :1;
var5 is a 4-bit unsigned integer that can hold values 0..15 (working on a reasonable assumption that u32 is a synonym for something like unsigned int).
You can't store fractional values in it. 0.1 and 0.8 would be stored as 0; 3.4 would be stored as 3.
If you really want fractions, you're going to have to work out how to represent them (fixed point arithmetic).