Re:Formatting floating point numbers
by TazeTSchnitzel on Friday June 14, 2019 @11:47AM
(#20183917)
libfmt's implementation of Grisu is what the original post (Formatting Floating Point Numbers) concerns, no?
Re:Formatting floating point numbers
by shereadsthenews on Friday June 14, 2019 @10:12AM
(#20183151)
libdouble-conversion is indeed far more flexible. I think that's what leads to all the extra typing! I mean, just including it is almost more typing than I'm willing to undertake ;-)
#include "third_party/double-conversion/double-conversion/double-conversion.h"
Internally it uses the same algorithm, Grisu, (with some additional optimizations) so there shouldn't be any difference in output.
If it's easier to use for you, just go with it!
I'm guessing the double-conversion library is a bit more flexible, but I could be wrong.