Don wrote > Consider this notorious piece of code: > > assert(x>1); > double y = 1 / x; > > This calculates y as the reciprocal of x, if x is a floating-point number. > But if x is an integer, an integer division is performed instead of a > floating-point one, and y will be 0. > > It's a very common newbie trap
Agreed! :(