PROGRAM FILE 13: FORMAT AND ROUNDING OF PRINTED                                 
        NUMERIC CONSTANTS.                                                      
    ANSI STANDARD 12.4, 5.2, 5.4                                                
                                                                                
SECTION 13.1: PRINTED REPRESENTATION OF CONSTANTS.                              
                                                                                
THE FORMAT OF A PRINTED CONSTANT IS DETERMINED BY THE VALUE                     
OF THE CONSTANT RATHER THAN BY ITS ORIGINAL REPRESENTATION.                     
THE SUPPRESSION OF LEADING INSIGNIFICANT ZEROS IN THE EXRAD                     
OR TRAILING INSIGNIFICANT ZEROS IN THE SIGNIFICAND                              
IS OPTIONAL.                                                                    
                                                                                
                                BEGIN TEST.                                     
                                                                                
     #         CONSTANT       NR1            NR2            NR3                 
                                                                                
     1          76767          76767                                            
     2          76767.0        76767                                            
     3          767.670E2      76767                                            
     4         -.987789                      -.987789                           
     5         -.0009877E9E3                 -.987789                           
     6         -9.87789E-1                   -.987789                           
     7          1230000000                                   1.23E+9            
     8          .0000012345                                  1.2345E-6          
     9          2.3E9                                        2.3E+9             
                                                                                
*** TEST PASSED IF THE CONSTANTS IN ROWS 1, 2 AND 3 PRINTED                     
    IN NR1 FORMAT; IN ROWS 4, 5 AND 6 IN NR2 FORMAT; AND IN                     
    ROWS 7, 8 AND 9 IN NR3 FORMAT  ***                                          
                                                                                
EXCEPT: IF SIGNIFICANCE-WIDTH FOR THIS IMPLEMENTATION IS                        
GREATER THAN 9, ROWS 7, 8, AND 9 MUST BE IN NR1, NR3,                           
AND NR1 FORMAT, RESPECTIVELY.                                                   
                                                                                
                                 END TEST.                                      
                                                                                
SECTION 13.2: ROUNDING RESULTS.                                                 
                                                                                
THE NUMBER OF SIGNIFICANT DIGITS PRINTED IS IMPLEMENTATION                      
DEFINED; HOWEVER, NR2 AND NR3 CONSTANTS WHICH CONTAIN EXCESS                    
DIGITS SHOULD BE PRINTED IN A STANDARD REPRESENTATION.                          
                                                                                
                                    BEGIN TEST.                                 
                                                                                
SOURCE CONSTANTS             PROCESSOR OUTPUT                                   
                                                                                
1  1234567886                 1.23457E+9                                        
2  .000001234567886           1.23457E-6                                        
3  9.999999999                10.                                               
4  923456.7886                923457.                                           
5 -0.09234567886             -9.23457E-2                                        
6  .04444444444               4.44444E-2                                        
7  .001200000004              .0012                                             
                                                                                
CORRECT REPRESENTATION FOR PROCESSORS PRINTING FROM 6 TO 9                      
SIGNIFICANT DIGITS                                                              
                                                                                
D = 6          D = 7          D = 8          D = 9                              
                                                                                
1  1.23457E+9  1.234568E+9    1.2345679E+9   1.23456789E+9                      
2  1.23457E-6  1.234568E-6    1.2345679E-6   1.23456789E-6                      
3  10          10             10             10                                 
  (10.)        (10.)          (10.)          (10.)                              
4  923457.     923456.8       923456.79      923456.789                         
  (923457)                                                                      
5 -9.23457E-2  -9.234568E-2   -9.2345679E-2  -9.23456789E-2                     
6  4.44444E-2  4.444444E-2    4.4444444E-2   4.44444444E-2                      
7  .001200     .0012000       .00120000      .001200000                         
                                                                                
*** TEST PASSED IF THE PROCESSOR OUTPUT IN THE FIRST SET                        
    OF NUMBERED ROWS MATCHES THE COLUMN CORRESPONDING                           
    TO THE IMPLEMENTATION-DEFINED SIGNIFICANCE-WIDTH                            
    (ALLOWING FOR OPTIONAL TRAILING ZEROS IN THE                                
    SIGNIFICAND AND LEADING ZEROS IN THE EXRAD) ***                             
                                                                                
                              END TEST.                                         
                                                                                
END PROGRAM 13                                                                  
