PROGRAM FILE 27: ACCURACY OF CONSTANTS AND VARIABLES.
    ANSI STANDARD 5.2, 5.4, 6.2, 6.4, 10.4

*** NOTE: THIS PROGRAM MAKES USE OF THE ON-GOTO STATEMENT
    AND FOR-BLOCKS (THE FOR AND NEXT STATEMENTS) WHICH
    HAVE NOT YET BEEN TESTED. IF SUBSEQUENT TESTS SHOW
    THESE FEATURES TO BE INCORRECTLY IMPLEMENTED, THEN THE
    VALIDITY OF THE RESULTS OF THIS TEST ROUTINE IS DOUBTFUL.

THIS PROGRAM TESTS THE LEVEL OF ACCURACY OF NUMERIC VALUE,
USING THE IF-THEN STATEMENT.

SECTION 27.1: ACCURACY IN COMPARISON OF VARIABLES.

THIS SECTION COMPARES TWO VARIABLES WHICH HAVE BEEN ASSIGNED
NUMERICALLY 'CLOSE' VALUES AND THEN DETERMINES WHETHER THE
IMPLEMENTATION CAN DISTINGUISH BETWEEN THEN OR IF THEY ARE
TREATED AS EQUAL.

                  BEGIN TEST.

NUMERIC VALUES                   DIGITS OF       RESULT OF
BEING COMPARED                   DECIMAL         COMPARISONS
                                 ACCURACY          >   =

9.876543212E-7 : 9.876533E-7        6              T   F    
9.876543212E-7 : 9.8765422E-7       7              T   F    
9.876543212E-7 : 9.87654311E-7      8              T   F    
9.876543212E-7 : 9.876543201E-7     9              T   F    

*** TEST INDICATES DECIMAL ACCURACY OF AT LEAST  9 DIGITS. ***
IF DOCUMENTATION FOR THE IMPLEMENTATION-DEFINED ACCURACY
   FOR NUMERIC VALUES IS COMPATIBLE WITH THIS RESULT, THEN
*** TEST PASSED ***

                   END TEST.

SECTION 27.2: ACCURACY IN THE COMPARISON OF VARIABLES
              WITH CONSTANTS.

THIS SECTION COMPARES A VARIABLE AND A CONSTANT WHICH HAVE
NUMERICALLY 'CLOSE' VALUES AND THEN DETERMINES WHETHER THE
IMPLEMENTATION CAN DISTINGUISH BETWEEN THEM OR IF THEY ARE
TREATED AS EQUAL.

                  BEGIN TEST.

NUMERIC VALUES                   DIGITS OF       RESULT OF
BEING COMPARED                   DECIMAL         COMPARISONS
                                 ACCURACY          >   =

-9.999988888E36 : -9.999999E36      6              T   F    
-9.999988888E36 : -9.9999899E36     7              T   F    
-9.999988888E36 : -9.99998899E36    8              T   F    
-9.999988888E36 : -9.999988899E36   9              T   F    

*** TEST INDICATES DECIMAL ACCURACY OF AT LEAST  9 DIGITS. ***
IF DOCUMENTATION FOR THE IMPLEMENTATION-DEFINED ACCURACY
   FOR NUMERIC VALUES IS COMPATIBLE WITH THIS RESULT, THEN
*** TEST PASSED ***

                   END TEST.

SECTION 27.3: ACCURACY IN THE COMPARISON OF CONSTANTS.

THIS SECTION COMPARES TWO CONSTANTS WHICH HAVE
NUMERICALLY 'CLOSE' VALUES AND THEN DETERMINES WHETHER THE
IMPLEMENTATION CAN DISTINGUISH BETWEEN THEM OR IF THEY ARE
TREATED AS EQUAL.

                  BEGIN TEST.

NUMERIC VALUES                   DIGITS OF       RESULT OF
BEING COMPARED                   DECIMAL         COMPARISONS
                                 ACCURACY          <   =

9.40395E-37 : 9.40396E-37           6              T   F    
9.40395E-37 : 9.403951E-37          7              T   F    
9.40395E-37 : 9.4039501E-37         8              T   F    
9.40395E-37 : 9.40395001E-37        9              T   F    

*** TEST INDICATES DECIMAL ACCURACY OF AT LEAST  9 DIGITS. ***
IF DOCUMENTATION FOR THE IMPLEMENTATION-DEFINED ACCURACY
   FOR NUMERIC VALUES IS COMPATIBLE WITH THIS RESULT, THEN
*** TEST PASSED ***

                   END TEST.

SECTION 27.4: ACCURACY FOR CONSTANTS EXPRESSED WITH
        DIFFERENT EXPONENTS.

CONSTANTS MUST BE ACCURATE EVEN WHEN NOT EXPRESSED IN
NORMALIZED FORM (1 <= SIGNIFICAND < 10).

                 BEGIN TEST.

*** TEST PASSED ***

                  END TEST.

SECTION 27.5: COMPUTED ACCURACY OF NUMERIC VALUES.

THIS SECTION USES A COMPUTATIONAL ALGORITHM TO ATTEMPT TO
DISCOVER THIS IMPLEMENTATION'S INTERNAL ACCURACY. BECAUSE
THE ALGORITHM RELIES SOMEWHAT ON ACCURACY OF EXPRESSION
EVALUATION, THE RESULTS ARE NOT ABSOLUTELY TRUSTWORTHY AND
SHOULD BE INTERPRETED IN LIGHT OF GENERAL KNOWLEDGE OF
THE CHARACTERISTICS OF THE SYSTEM.

*** THIS TEST IS INFORMATIVE ONLY ***

              BEGIN TEST.

COMPUTED ACCURACY =  16 DECIMAL DIGITS.
COMPUTED ACCURACY =  53 BINARY DIGITS.

               END TEST.

END PROGRAM 27

Program interrupted at line 6450
