News for hackers. Stuff that matters.
Re:Rendering floating numbers: advances in problems you didn... by StephanTLavavej on Friday October 30, 2020 @01:57AM (#24939577)
That “weirdness” is just scientific notation, which the Ryu implementation always emits. It is “superficial” in the sense that it’s separate from the core algorithm. When I adapted it for C++17 charconv in MSVC, I implemented fixed, general, and “plain shortest” notation, which will print 0.3 there. (General notation follows C printf %g’s rules for switching between fixed and scientific; “plain shortest” notation selects the one that’s fewer characters, tiebreaking to prefer fixed).

There are no comments on this comment yet.