static string GetString (float value)
{
var temp = value;
if (value >= 1000)
temp /= 1000;
temp = (float)Math.Floor (temp * 100 / 100);
bool tooSmall = Math.Abs ((float)Math.Floor (temp) - temp) < float.Epsilon;
return tooSmall ? temp.ToString ("F1") : temp.ToString ("0.#");
}
}