13

Today I learned that -Infinity >> 0 = 0

Comments
  • 0
    You're Right
  • 2
    >> is on integer values
    !isfinite are converted to 0 per the standard

    I don’t see the problem 👀
  • 2
    @penless No issue. I just didn’t realize that it coerced values to INT32 before bitwise operations
  • 1
    @AmyShackles I mean it's pretty hard to define shifts on floats.
    What it could do is to convert it to INT_MIN, as they have an identical purpose.
Add Comment