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

Fix issue with test on format_numbers failing #56

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

addisonElliott
Copy link
Collaborator

Issue was with using repr on Python 3.1 onwards which rounds floating point numbers to 12 decimals. The format_number function rounds to 17 digits which is what is required for full precision of a 64-bit floating point number.

See more information here: https://docs.python.org/3.4/tutorial/floatingpoint.html

The test was altered to use the decimal library and rounding to 17 points instead of using repr.

Issue was with using repr on Python 3.1 onwards which rounds floating point numbers to 12 decimals. The format_number function rounds to 17 digits which is what is required for full precision of a 64-bit floating point number.

See more information here: https://docs.python.org/3.4/tutorial/floatingpoint.html

The test was altered to use the decimal library and rounding to 17 points instead of using repr.
@addisonElliott addisonElliott merged commit 2885a9c into mhe:master Aug 16, 2018
@addisonElliott addisonElliott deleted the fix-format-numbers-bug branch August 16, 2018 17:53
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.

1 participant