Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12768

[C++] Add sign bit checks to floating-point arithmetic kernels tests

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 7.0.0
    • C++

    Description

      There are special cases in arithmetic kernels with floating-point arguments that can result in signed values which are equivalent to their unsigned counterpart when compared with the equality operator. To make the comparisons correct, one needs to also compare the sign bit. For example, -0.0 == 0.0 is true while std::signbit(-0.0) == std::signbit(0.0) is false. This issue also applies to Inf and NaN values.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              edponce Eduardo Ponce
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h

                  Slack

                    Issue deployment