Replacement for snprintf

Walter Bright newshound2 at
Thu Oct 31 01:09:14 UTC 2019

Replacing snprintf for floating point is very challenging, because:

1. people have been improving snprintf for decades
2. people expect precision and performance
3. the standard is snprintf, any credible implementation must be the same or better

To that end, you'll need to be familiar with the following:

754-2019 IEEE Standard for Floating Point Arithmetic

Printing Floating-Pointer Numbers Quickly and Accurately with Integers

Printing Floating-Point Numbers

Ryu Fast Float To String Conversion

Jonathan Marler's D implementation of ryu:

For historical interest, here's DMC's version, which was state of the art in the 

More information about the Digitalmars-d mailing list