Skip to content

Conversation

@JanBobolz
Copy link
Member

The old version decomposed "100" into "[0, 0, 10]" in base 10. Also, it never really threw an exception if the number was too large to write with the given number of digits, it just produced one giant digit to compensate.

The new version does the more usual computation of computing the digits from least significant to most significant.

@JanBobolz JanBobolz added the bug Something isn't working label Jul 3, 2021
@JanBobolz JanBobolz requested a review from this-kramer July 3, 2021 08:42
@JanBobolz JanBobolz self-assigned this Jul 3, 2021
Copy link
Member

@this-kramer this-kramer left a comment

Choose a reason for hiding this comment

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

Looks good. Do you have a test case to ensure this bug will be detected in the future?

@JanBobolz
Copy link
Member Author

To be honest, I’m just crossing my fingers that the code works now. Also, it doesn’t depend on anything and the code itself is unlikely to change in the future :)

@JanBobolz JanBobolz merged commit 2060fb5 into develop Jul 3, 2021
@JanBobolz JanBobolz deleted the fixDigits branch July 3, 2021 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants