5903 Intro Scientific Prog:
Limits: Specification

  1. Find and print (from a program) all the hard code max values you can.  e.g. INT_MAX, MAX_RAND, etc. Explain the values for these in the README file.  <limits.h>, <float.h> and <stdlib.h> are useful as is the web page http://www.delorie.com/gnu/docs/glibc
  2. Write code to find the largest representable floating point number.  Explain in the README what happens when you exeed this value.
  3. Write code to find the smallest (in absolute value) representable floating point number.  Explain in the README what happens when you go below this value.
  4. Write code to find the largest representable integer.  Explain in the README what happens when you exeed this value.
  5. Write code to find out the largest u such that 1.0 + u =1.0 in floats and doubles. Explain in the README what is going on.
  6. Write code to find out the smallest x such that 1.0 + x = x in floats and doubles. Explain in the README what is going on.