float = int - unsigned_int; leads to problems when the answer should be negative. Type case the unsigned_int first or change the variable you are saving the answer to into an int.
float = int - (int)unsigned_int;
or
int = int - unsigned_int;