Skip to content

Conversation

@eastWillow
Copy link

Ensure correct handling of signed zero in addition cases:
(+0) + (-0) should yield +0, and (-0) + (-0) should yield -0,
as required by IEEE 754-2019 Section 6.3 under the default rounding mode.

Original behavior:

  1. (+0) + (-0) returns -0, not following the spec
  2. (-0) + (-0) returns -0, following the spec

Patched behavior:

  1. (+0) + (-0) returns +0, following the spec
  2. (-0) + (-0) returns -0, following the spec

Ensure correct handling of signed zero in addition cases:
(+0) + (-0) should yield +0, and (-0) + (-0) should yield -0,
as required by IEEE 754-2019 Section 6.3 under the default
rounding mode.

Original behavior:
1. (+0) + (-0) returns -0, not following the spec
2. (-0) + (-0) returns -0, following the spec

Patched behavior:
1. (+0) + (-0) returns +0, following the spec
2. (-0) + (-0) returns -0, following the spec
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.

1 participant