Printing floating points
bcarneal at gmail.com
Wed Jan 27 01:16:40 UTC 2021
On Wednesday, 27 January 2021 at 00:15:41 UTC, Joseph Rushton
> On Tuesday, 26 January 2021 at 16:25:54 UTC, Berni44 wrote:
>> The paper states 104KB for doubles (can be compressed on the
>> expense of slowing everthing down).
> It also notes that "the size could be halved to 52 kB with no
> performance impact".
> For comparison, a simple "Hello, World!", built with
> optimizations and stripped, comes to about 700 kB. Even
> allowing that the 128-bit table (which will support 80-bit
> reals) is going to be larger, is this really an issue on modern
> The only circumstances I can see it mattering is in very
> low-resource embedded use-cases where D stdlib is unlikely to
> be viable anyway.
I'd vote for "overweight and almost-certainly-correct" over "trim
but iffy" if the extra poundage is reasonable which, in the
non-embedded environments, it appears to be.
On another note, it looks like ryu was submitted by MS in late
2019 for inclusion in libc++. Despite a massive 3 minutes of
google-fuing, I'm still not sure how far that has gotten but the
direction seems pretty clear. A large body of others believe
that ryu is a good way to go and are moving to standardize on it.
It's not a live-or-die issue for me but ryu looks pretty good.
More information about the Digitalmars-d