PROGRAM FILE 28: EXCEPTION - DIVISION BY ZERO.                                  
    ANSI STANDARD 7.5                                                           
                                                                                
THIS PROGRAM TESTS VARIOUS CASES OF DIVISION BY ZERO.                           
                                                                                
SECTION 28.1: POSITIVE NUMBER DIVIDED BY ZERO.                                  
                                                                                
THIS SECTION TESTS THE RESULT OF DIVIDING A POSITIVE                            
QUANTITY BY ZERO.                                                               
                                                                                
TO PASS THIS TEST:                                                              
                                                                                
    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE                              
       DISPLAYED, AND                                                           
                                                                                
    2) POSITIVE INFINITY MUST BE SUPPLIED AS THE VALUE                          
       OF THE EXPRESSION AND EXECUTION CONTINUES.                               
                                                                                
               BEGIN TEST.                                                      
                                                                                
*** WARNING:  Divide by 0 ***                                                   
VALUE SUPPLIED =  1.79769E+308                                                  
                                                                                
IF VALUE SUPPLIED = POSITIVE MACHINE INFINITY, AND                              
   EXCEPTION REPORTED, THEN                                                     
*** TEST PASSED ***                                                             
                                                                                
                END TEST.                                                       
                                                                                
SECTION 28.2: NEGATIVE NUMBER DIVIDED BY ZERO.                                  
                                                                                
THIS SECTION TESTS THE RESULT OF DIVIDING A NEGATIVE                            
QUANTITY BY ZERO.                                                               
                                                                                
TO PASS THIS TEST:                                                              
                                                                                
    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE                              
       DISPLAYED, AND                                                           
                                                                                
    2) NEGATIVE INFINITY MUST BE SUPPLIED AS THE VALUE                          
       OF THE EXPRESSION AND EXECUTION CONTINUES.                               
                                                                                
               BEGIN TEST.                                                      
                                                                                
*** WARNING:  Divide by 0 ***                                                   
VALUE SUPPLIED = -1.79769E+308                                                  
                                                                                
IF VALUE SUPPLIED = NEGATIVE MACHINE INFINITY, AND                              
   EXCEPTION REPORTED, THEN                                                     
*** TEST PASSED ***                                                             
                                                                                
                END TEST.                                                       
                                                                                
SECTION 28.3: ZERO DIVIDED BY ZERO.                                             
                                                                                
THIS SECTION TESTS THE RESULT OF DIVIDING ZERO BY ZERO.                         
                                                                                
TO PASS THIS TEST:                                                              
                                                                                
    1) A MESSAGE IDENTIFYING THE EXCEPTION MUST BE                              
       DISPLAYED, AND                                                           
                                                                                
    2) POSITIVE INFINITY MUST BE SUPPLIED AS THE VALUE                          
       OF THE EXPRESSION AND EXECUTION CONTINUES.                               
                                                                                
               BEGIN TEST.                                                      
                                                                                
*** WARNING:  Divide by 0 ***                                                   
VALUE SUPPLIED =  1.79769E+308                                                  
                                                                                
IF VALUE SUPPLIED = POSITIVE MACHINE INFINITY, AND                              
   EXCEPTION REPORTED, THEN                                                     
*** TEST PASSED ***                                                             
                                                                                
                END TEST.                                                       
                                                                                
END PROGRAM 28                                                                  
