MAT E 460 ENGINEERING COMPUTATION LABORATORY

What are the largest and smallest number that your computer can handle?


Actually, this depends on the computer and the program that you are using. If for any reasons your program exceed any of these limits, then either errors (underflow, overflow, or NaN - which means "Not-a-Number") or "crashing" occur.  In some cases your program will terminate with an error, in some other cases it may continue with unpredictable (and usually unwanted) results.

Experiment with the following algorithm:

Define two variable
      {   Over=1                   Under = 1
Then iterate until an "error" occurs
     {    Over  =  Over*2      Under = Under/2              
print over, under   }

Try the same excersice in: (a) EXCEL, (b)  Maple and (c) if you can in FORTRAN.
Notice what happens when "underflow" or "overflow" occurs in each case.
If division by 2 or multiplication by 2 does not give you quickly an error use a large number instead of 2. Alternatively you can try raising the number to a power.