Just before I give any answers, here are some more .NET math questions:

  1. If x and y are double and x = y, then 1/x = 1/y.
  2. If x is an int, then x >> 1 = x / 2.
  3. If x and y are decimal and x = y, then x.ToString() == y.ToString().
  4. 1 / ( 1/ x ) = x.
  5. If x is a long, (long) (double) x = x.
  6. If x is a double and an integer and y = x, then x++ causes x > y.