Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: significant_digits as alternative to decimal_places #36

Open
cederberg opened this issue Oct 8, 2023 · 0 comments
Open

Comments

@cederberg
Copy link

Sometimes I find it useful to print values with a minimum number of significant digits, instead of locking the number of decimals used. For example, when printing a system memory summary:

3.1 GiB (61.2%) free ∙ 677.1 MiB rss ∙ 1.3 GiB cache ∙ 5.1 GiB total

It is slightly easier to read when a minimum of two significant digits are used, instead of locking the number of decimals to 1:

3.1 GiB (61.2%) free ∙ 677 MiB rss ∙ 1.3 GiB cache ∙ 5.1 GiB total

Would this be an interesting addition to the library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant