Comment Comment by heinrichhartman int mid =(low + high) / 2; > Specifically, it fails if the sum of low and high is greater than the maximum positive int value (2^31 - 1).I would really challenge calling this kind of effects "bug" or "breakage".It's like calling Newtons law of gravity broken, because it's not accurate at predicting how galaxies move.Things are engieered and tested for a certain scale.Knowing which tools to use at which sacle is part of the craft of engineering. parent heinrichhartman 1 year ago
I would really challenge calling this kind of effects "bug" or "breakage".
It's like calling Newtons law of gravity broken, because it's not accurate at predicting how galaxies move.
Things are engieered and tested for a certain scale.
Knowing which tools to use at which sacle is part of the craft of engineering.