Use float for decision to have better precision