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

PHP 8.4: Document RoundingMode #4080

Merged
merged 3 commits into from
Nov 20, 2024
Merged

PHP 8.4: Document RoundingMode #4080

merged 3 commits into from
Nov 20, 2024

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Nov 17, 2024

Related to #3419 and php/phd#179

@Girgias Girgias requested a review from TimWolla November 17, 2024 04:44
@Ayesh Ayesh added this to the PHP 8.4 milestone Nov 17, 2024
Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

Overall this LGTM for an initial version.

reference/math/roundingmode.xml Outdated Show resolved Hide resolved
Comment on lines +25 to +27
Round to the nearest integer.
If the decimal part is <literal>5</literal>,
round to the integer with the larger absolute value.
Copy link
Member

Choose a reason for hiding this comment

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

I assume you've taken all the description from the RFC?

Copy link
Member

Choose a reason for hiding this comment

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

The bit with the decimal part might need some adjustments either in the documentation for round() or in here, because round() supports rounding to a specified precision instead of integers.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have indeed taken them from the RFC, yeah the whole round() semantics is... going to be a PITA.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I will merge as is, feel free to open an issue about the wording to keep track of it

Copy link
Member

Choose a reason for hiding this comment

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

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.

3 participants