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

Align columns better with values padded up to 12 digits #283

Closed
wants to merge 1 commit into from

Conversation

zptro
Copy link
Collaborator

@zptro zptro commented Apr 8, 2021

  • Align columns better with values padded up to 12 digits
  • Restrict number of significant digits to 7, larger numbers as exponents

Restrict number of significant digits to 7, larger numbers as exponents
@zptro zptro requested a review from johpiip April 8, 2021 06:49
@zptro zptro mentioned this pull request Apr 8, 2021
@zptro zptro added this to the v4.0.5 milestone Apr 8, 2021
Copy link
Contributor

@johpiip johpiip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When decimal numbers are rounded to 7 significant digits, trailing zeros are dropped. This can be verified in workforce_accessibility_per_area.txt where espoo_vant_kau 3993.18506 becomes espoo_vant_kau 3993.185 (7 significant digits = 7 digits) but helsinki_cbd 4571.64987 becomes helsinki_cbd 4571.65 (7 significant digits = 6 digits because last one is rounded to zero). Is this intentional? Both ways are fine by me. (Of course, dropping zeroes may imply that they are not signicant when they actually are...)

Edit: corrected numbers.

@zptro
Copy link
Collaborator Author

zptro commented Apr 8, 2021

Should ask users if they want this change or not.

@zptro zptro closed this Apr 8, 2021
@zptro zptro removed this from the v4.0.5 milestone Apr 8, 2021
@zptro zptro linked an issue Apr 8, 2021 that may be closed by this pull request
@johpiip
Copy link
Contributor

johpiip commented Apr 8, 2021

@zptro My comment in Teams was about whitespaces but my comment in this PR was about significant digits. I like the idea of explicitly rounding to seven significant digits but I commented on trailing zeros. :)

@zptro
Copy link
Collaborator Author

zptro commented Apr 8, 2021

@zptro My comment in Teams was about whitespaces but my comment in this PR was about significant digits. I like the idea of explicitly rounding to seven significant digits but I commented on trailing zeros. :)

Yes, maybe I could do a separate PR, changing %1.5f into %.7g.

@zptro zptro deleted the feat/align-columns branch August 12, 2021 05:50
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

Successfully merging this pull request may close these issues.

Columns in result files are not aligned
2 participants