How to safely and reasonably convert a float or double to string or char array?

BulldogLowell:
No, not the counting numbers (i.e. integers).

Yes, even them. You have to separate the abstract concept of a number, from the concrete representation of the number. For the abstract concept pretend I have 3 apples. Would you write that I have 3, 3.0, 3.00, 3.000, 3.0000. How many apples do I have there?

Now the concrete is different. If someone wrote that I had 3 apples, you aren't entirely sure I didn't have a little piece of an extra apple or that I hadn't taken a bite out of one of them and the writer rounded off. But if he said that I had 3.0 apples, you could be sure that I hadn't bitten off more than a tenth of one. If he said I had 3.00 apples then you're sure I haven't bitten off more than a hundredth of one.

The key concept that the OP needs to grasp is the concept of significant digits. Many a student has messed up their grade in chemistry class over sig figs.