Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
stevoski
on Dec 7, 2022
|
parent
|
context
|
favorite
| on:
Fast midpoint between two integers without overflo...
If a=1 and b=1, the midpoint should be 1.
But in computing, assuming we are only dealing with integers, 1/2 == 0. So 1/2 + 1/2 returns 0.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
But in computing, assuming we are only dealing with integers, 1/2 == 0. So 1/2 + 1/2 returns 0.