Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
penless36184d>> is on integer values
!isfinite are converted to 0 per the standard
I don’t see the problem 👀
hashedram11908144dI don't get why people think this is undefined behavior. MDN docs literally explain this specific case.
homo-lorens6988144d@hashedram My axioms:
-infinity has the same role as INT_MIN
Because they have the same role, casting -infinity to INT_MIN would be the least disruptive.
Because you aren't expected to know when a cast happens, it's best if the casts are the least disruptive possible.