2 ms·
"%0.17g" is the format string I eventually concluded was the preferred one for this.
by pjc50 8y ago
"%0.17g" is the format string I eventually concluded was the preferred one for this.
- kentonv 8y agoUnfortunately, that format will print 0.2 as "0.20000000000000001". What we want is the shortest-length string that will parse back to the same original value, which is "0.2".
- deleted 8y ago[deleted]