.NET Math Quiz

1/9/2005 12:20:01 PM

.NET Math Quiz

I have decided to test how numerate (mathematically literate) my readership is.  These are questions that one might find in a high school test... except I substituted the set of ints or longs for that of integers and the set of doubles for that of reals.

For each statement, answer true or false.

If x, y, z are ints, ...

  1. If x < 0, then -x > 0.
  2. If x = -x, then x = 0.
  3. If x -y > 0, then x > y.
  4. If x and y are positive , then x + y > x.
  5. If x and y are positive, then (double)x * (double)y = (long)x * (long)y.
  6. If x-y>0 and y-z>0, then x-z>0.

If x, y, z are doubles, ...

  1. x = x.
  2. If x>y is false, then x<=y is true.
  3. If x > 0, then x - x = 0.
  4. If x and y are positive integers, then x + y > x.
  5. If x and y are positive integers, then the statement "x + y = x for all y" is false for all x.
  6. If x <= 0 is false, then x > 0.
  7. If x and y are longs, then (double)(x + y) = (long)(x + y).
  8. if x.Equals(y), then x = y.
  9. If x.Equals(-x), then x = 0.
  10. if x.ComparesTo(y) < 0, then x < y.

Comments

 

Navigation

Categories

About

Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media