News for hackers. Stuff that matters.
Re:Formatting floating point numbers by tomxor on Friday June 14, 2019 @11:34AM (#20183815)
> that only converted 'simple' numbers, i.e. no scientific notation, only one (fixed) decimal separator, etc. [...] Anyway this simple implementation was ~10 times faster

What about numbers with a large order of magnitude? e.g 1e234. Is making very long strings still faster than switching to e notation?

Re:Formatting floating point numbers by roel_v on Friday June 14, 2019 @12:07PM (#20184102)
I don't know - I knew that my input data wouldn't have to deal with such cases so I didn't have to deal with / check for it. This was part of 'etc' catchall :)
Re:Formatting floating point numbers by tomxor on Friday June 14, 2019 @12:38PM (#20184341)
I guess an alternative is _always_ using e notation but don't bother moving the decimal, i.e effectively the same as the encoding but in base 10. That would be both simple and have small maximum string length.

Users probably wouldn't like it thought :P damn users.