Added float a type to sort and use float as the type for accumulations