Skip to content

Conversation

@Toprak2
Copy link
Contributor

@Toprak2 Toprak2 commented Nov 6, 2024

Fixes #217

Changes proposed in this pull request:

  • Change the order of operations of the return statement in the naturalsize function to ensure all intermediate calculations stay float to prevent overflow issues.

@hugovk hugovk added the changelog: Fixed For any bug fixes label Nov 6, 2024
@hugovk hugovk merged commit 6a70582 into python-humanize:main Nov 6, 2024
@hugovk
Copy link
Member

hugovk commented Nov 6, 2024

Thank you!

@Toprak2 Toprak2 deleted the fix-naturalsize-overflow branch November 7, 2024 06:49
@hugovk hugovk changed the title Fix overflow issue in naturalsize with np.int32 input Fix overflow issue in naturalsize with np.int32 input Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

naturalsize np.int32 multiplication overflow

2 participants