PROGRAM FILE 169: EXCEPTION - NUMERIC UNDERFLOW IN THE                          
        EVALUATION OF NUMERIC EXPRESSIONS ACTING AS                             
        ARGUMENTS AND SUBSCRIPTS.                                               
    ANSI STANDARD 6.4, 7.4, 7.6, 8.4                                            
                                                                                
THIS PROGRAM TESTS THAT THE HANDLING OF                                         
UNDERFLOW OCCURRING DURING THE EVALUATION OF NUMERIC                            
EXPRESSIONS WORKS PROPERLY IN CONTEXTS OTHER THAN SIMPLE                        
ASSIGNMENT OF THE EXPRESSION TO A VARIABLE. SPECIFICALLY,                       
EXPRESSIONS ARE USED AS ARGUMENTS TO FUNCTIONS AND                              
SUBSCRIPTS OF ARRAYS.                                                           
                                                                                
SECTION 169.1: NUMERIC UNDERFLOW IN AN ARGUMENT TO A                            
        SUPPLIED FUNCTION.                                                      
                                                                                
TO PASS THIS TEST:                                                              
                                                                                
    1) A MESSAGE IDENTIFYING AN EXCEPTION MAY BE                                
       DISPLAYED (NOT MANDATORY), AND                                           
                                                                                
    2) ZERO MUST BE SUPPLIED AS THE VALUE                                       
       OF THE ARGUMENT AND EXECUTION CONTINUES.                                 
                                                                                
                   BEGIN TEST.                                                  
                                                                                
ABOUT TO EVALUATE EXP(1E-20 ^ 5000).                                            
                                                                                
                                                                                
RESULT OF EXP(1E-20 ^ 5000) =  1                                                
                                                                                
*** TEST PASSED ***                                                             
                                                                                
                    END TEST.                                                   
                                                                                
SECTION 169.2: NUMERIC UNDERFLOW IN AN ARRAY SUBSCRIPT.                         
                                                                                
TO PASS THIS TEST:                                                              
                                                                                
    1) A MESSAGE IDENTIFYING AN EXCEPTION MAY BE                                
       DISPLAYED (NOT MANDATORY), AND                                           
                                                                                
    2) ZERO MUST BE SUPPLIED AS THE VALUE                                       
       OF THE SUBSCRIPT AND EXECUTION CONTINUES.                                
                                                                                
                   BEGIN TEST.                                                  
                                                                                
ABOUT TO EVALUATE Z(-1E-20 ^ 5001), WHERE Z(I) = I + 100.                       
                                                                                
                                                                                
RESULT OF Z(-1E-20 ^ 5001) =  100                                               
                                                                                
*** TEST PASSED ***                                                             
                                                                                
                    END TEST.                                                   
                                                                                
END PROGRAM 169                                                                 
