News for hackers. Stuff that matters.
Re:Formatting floating point numbers by shereadsthenews on Friday June 14, 2019 @09:22AM (#20182712)
What about libfmt? Frankly I find it a little easier to use than double-conversion and it's equal in speed.
Re:Formatting floating point numbers by floitsch on Friday June 14, 2019 @09:35AM (#20182822)
Looks like a great library. Not sure I actually knew about it. I will probably update the double-conversion library README to add a link.

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.

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"
Re:Formatting floating point numbers by dunham on Friday June 14, 2019 @03:21PM (#20185888)
In emacs, Meta-/ might help. :)

> Expands to the most recent, preceding word for which this is a prefix.