Fixed float <--> float casting and simplified float <--> int