Skip to content

Add guidance for when rounding special floating-point values #312

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 2 commits into from
Nov 8, 2021

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 4, 2021

This PR

  • clarifies rounding behavior when encountering special floating-point values, such as NaN, +-infinity, and +-0. The lack of guidance was raised in Specify zero division behavior #199.
  • adds special cases to ceil, floor, round, and trunc.

cc @asmeurer

@kgryte kgryte added the Maintenance Bug fix, typo fix, or general maintenance. label Nov 4, 2021
@kgryte kgryte added this to the v2021 milestone Nov 4, 2021
@kgryte kgryte requested review from asmeurer and removed request for asmeurer November 4, 2021 12:22
@kgryte
Copy link
Contributor Author

kgryte commented Nov 8, 2021

As this PR clarifies special case behavior for floating-point operands and does not introduce any controversial changes (all array libraries following IEEE 754 should already follow the guidance introduced in this PR), will merge.

@kgryte kgryte merged commit 65305a4 into main Nov 8, 2021
@kgryte kgryte deleted the rounding-floats branch November 8, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Bug fix, typo fix, or general maintenance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant