Y
Hacker News
new
|
ask
|
show
|
jobs
by
nostromo
4995 days ago
4.5 is halfway between 0 and 9. Halfway between 1 and 9 is 1+(9-1)/2 = 5
1 comments
JoeAltmaier
4995 days ago
Nu-uh. By that math, halfway between 1 and 2 is.... 1?!
link
jlgreco
4995 days ago
1+(2-1)/2 1+(1)/2 1.5
It only equals 1 if you are using ints ;) I do that more often than I care to admit, I blame programming.
link
kylebrown
4995 days ago
his formula is correct. you made a mistake in the order of operations.
link