You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std.fmt does currently only offer the "w" and "p" flags for ensuring a minimum width and padding to that width. Something equivalent to "%.2f" in C would be nice to have, such a flag would set the exact width of the digits after the decimal point. There's a bit of complication in C mandating that rounding must happen and that a precision of zero is handled specially by not printing a decimal point at all.
The text was updated successfully, but these errors were encountered:
Sorry, been pretty busy, haven't had a chance to get to this yet. However, for reference, the Ryu algorithm (https://github.com/ulfjack/ryu) also came out recently. TODO: Implement it and replace dragon4.
Note that I still don't have any idea or preference on what to name the precision flag. The obvious choice of "p" is already taken. Modula-3 uses a "prec" keyword, but that would look odd next to the single-letter ones. "f" would be easy to remember.
std.fmt
does currently only offer the "w" and "p" flags for ensuring a minimum width and padding to that width. Something equivalent to "%.2f" in C would be nice to have, such a flag would set the exact width of the digits after the decimal point. There's a bit of complication in C mandating that rounding must happen and that a precision of zero is handled specially by not printing a decimal point at all.The text was updated successfully, but these errors were encountered: