Skip to content

ext/bcmath: Fixed bcdiv() div by one #15629

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

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

SakiTakamachi
Copy link
Member

@SakiTakamachi SakiTakamachi commented Aug 28, 2024

Fixed the incorrect scale that should be used when dividing by 1, that is, comparing the divisor and 1 to confirm equality

Additionally, have increased the number of test cases for bcdiv_by_pow_10.phpt.

@SakiTakamachi SakiTakamachi marked this pull request as ready for review August 29, 2024 05:57
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

Indeed! Nice catch.
The commit/PR description seems a bit off though, it has nothing to do with divide by zero, but the scale of divide by one. Please amend this before merging. Thanks!

@SakiTakamachi SakiTakamachi changed the title ext/bcmath: Fixed bcdiv() div by zero ext/bcmath: Fixed bcdiv() div by one Aug 30, 2024
@SakiTakamachi SakiTakamachi merged commit e8fe7e4 into php:master Aug 30, 2024
8 of 10 checks passed
@SakiTakamachi SakiTakamachi deleted the fix/bcdiv_by_one branch August 30, 2024 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants