Fixed float_to_string function