Skip to content

Fix number_to_human rounding and skipping errors#11

Merged
danielberkompas merged 1 commit into
masterfrom
fix-rounding-errors
Dec 16, 2015
Merged

Fix number_to_human rounding and skipping errors#11
danielberkompas merged 1 commit into
masterfrom
fix-rounding-errors

Conversation

@danielberkompas

Copy link
Copy Markdown
Owner

As reported in #10, number_to_human does not properly handle numbers
such as 999,001 or 999,999, and it also incorrectly rounds 998.99 to
998.00.

This commit fixes both issues. Contrary to what the bug report
suggested, 998.999 should round to 999.00 with a precision of 2, not
998.99.

Closes #10.

As reported in #10, `number_to_human` does not properly handle numbers
such as 999,001 or 999,999, and it also incorrectly rounds 998.99 to
998.00.

This commit fixes both issues. Contrary to what the bug report
suggested, 998.999 should round to 999.00 with a precision of 2, not
998.99.

Closes #10.
danielberkompas added a commit that referenced this pull request Dec 16, 2015
Fix number_to_human rounding and skipping errors
@danielberkompas danielberkompas merged commit 77b7fe1 into master Dec 16, 2015
@danielberkompas danielberkompas deleted the fix-rounding-errors branch December 16, 2015 04:35
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.

number_to_human skips some numbers

1 participant