Correct casting as float/int