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

numfmt: don't round floats if --from is "none" #3742

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

cakebaker
Copy link
Contributor

So far uutils numfmt rounds floats up if --from is not specified. For example, numfmt 0.1 returns 1. GNU numfmt doesn't do any rounding in this case, i.e., it returns 0.1 in the aforementioned example.

This PR fixes this behavior and makes the tests float-1, float-2, neg-5, and leading-2 in https:/coreutils/coreutils/blob/master/tests/misc/numfmt.pl pass.

@sylvestre sylvestre merged commit 41003f4 into uutils:main Jul 24, 2022
@cakebaker cakebaker deleted the numfmt_float branch July 25, 2022 06:07
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.

2 participants