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

westfw:
It's worth remembering why printf() and floatingPoint printf() are not the defaults. a printf() based implementation of "hello world" is about 1k bigger than the same with Serial.print(), and using the floating point version of printf() expands the difference to about 4kbytes, WHETHER OR NOT YOU USE THE FLOATING POINT FEATURES. Those were big numbers back when a "large" AVR only had 4k to 8k of code space.

Did you see my [u]post[/u] a few places up?

There are TWO different floating point support files... one for printf and related, another for scanf and related.

There is no need to link in BOTH of them, You can use one, the other or both. And, since scanf and related are rarely used, one can link in ONLY the printf floating point code and save quite a bit of space.

That's why I have the option to chose one, the other or both in my Preferences.

(click image for full size)
prefs.jpg