What would be a better name for the dtoa function that converts a floating-point number to a string in decimal and also works with float?
Current signature:
void dtoa(double value, char* buf);
The current tentative name is to_string since it will give the same output as std::to_string after my fix.
@vitaut `fptoa`?`fpclassify` is an example of 'fp' used to mean 'any old floating-point'. The 'a' and the 'to' are appealing because similar fns, e.g. `atof` also have narrow contracts & sharp edges. (How's the long double overload coming along?)
@vitaut honestly, `numtoa` if you can throw in a few int converters as well
@funkylab I wonder if toa is a bit cryptic?
@vitaut fair, `num_to_text` to avoid the std:: or NUL-terminated string association of `xtostr`
@funkylab @vitaut 'a' at the end must have meant "ASCII" once upon a time
@dimpase @vitaut yes, that's what it's documented to mean in the UNIX programmer's manual from 1971. Was fully aware of that!
@dimpase @vitaut (Ritchie's manual, chapter Library Routines, of course only covers ftoa and itoa, not dtoa)

@vitaut Herbert von Floatentostrien III.

Alternatively:

Billy Bob "Float-r-Done" Stringer.

@vitaut I wonder what exactly does krakatoa convert to string
Wtf a kraka is
@lisyarus not sure either by the conversion process is impressive
@lisyarus @vitaut in finnish, 'kraka' is short for 'kravatti', which means 'necktie'. Does not sound that useful 🤔
@jisotupa @vitaut Oh, interesting! Is it a loan word from French "cravate"?
@lisyarus @vitaut yes indeed! There is also a proper Finnish word, 'solmio' , but everybody just says 'kraka' 😊
@vitaut fod_ctsid() (float or double, convert to string in decimal), obviously
@oleksandr rolls of the tongue

@vitaut @oleksandr Ah so we aim for something short and succinct as BLAS or NETLIB would have liked it (if Fortran, unlike C, didn't actually come with an actual type system that allows for automatic conversion between numeric and string type) (I mean, C does have a type system: it has function pointers, and any object but function pointers.)

(EDIT: luckily remembered that the German word "prägnant" translates to "succinct". Not something phonetically much closer.)

@vitaut You forgot the buf_len argument.
@grafikrobot the exact API can be tweaked, the question is about the naming
@vitaut Well.. It depends. As in the name depends on the API. As it stands I'd name it "unsafe_num2chars_dont_use_you_idiot` ;-)
@grafikrobot I do plan to add _unchecked suffix once the dust settles =)
@grafikrobot @vitaut buffer size is constant for this API, though a span could maybe be returned, no?
@vitaut If you want to stay cryptic, then fptoa() would seem to be a natural choice. If your budget allows for more than a few letters and maybe even some underscores, you could go with fpnumber_to_string().
@VZ @vitaut except that sounds a lot more like functions that a) return std::string, and b) are easy to use safely. Sometimes cryptic signals caution, and this fn isn't for the casual, modern-C++ user. (I think a wrapper, `std::string to_string(double value)`, would be nice, and not too slow in many cases.)