5903 Intro Scientific Prog:
Limits: Specification
- 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
- Write code to find the largest representable floating point
number. Explain in the README what happens when you exeed this
value.
- 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.
- Write code to find the largest representable integer.
Explain in the README what happens when you exeed this value.
- 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.
- 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.