ISO/IEC JTC1/SC22/WG5 N1368 Date: 13 August 1999 To: WG5 From: John Reid Subject: TR 15580: differences between first and second editions The second edition of TR 15580 corresponds to the first edition with the following changes: Page 3, line 3+. Add o The elemental operator == for two values of one of these types to return .TRUE. if the values are the same and .FALSE. otherwise. o The elemental operator /= for two values of one of these types to return .TRUE. if the values differ and .FALSE. otherwise. Page 4, 2.5, line 8. Change "a process" to "an operation" Page 7, after edit for 19/6. Add 94/11+. Add new item: (5a) A reference to the transformational function IEEE_SELECTED_REAL_KIND from the intrinsic module IEEE_ARITHMETIC, where each argument is an initialization expression. Page 7, after edit for 186/17. Add 186/17+ Add paragraph: Procedures and types defined in an intrinsic module are not themselves intrinsic. Page 7, after edit for 228/36. Add 297/10. Change "" to " that is either or is defined in an and" 297/25. Change "and procedures" to "procedures, and modules". 297/26. After "and" add "that". 297/27. Add "Procedures and types defined in an intrinsic module are not themselves intrinsic.". 301/1 Change "" to " that is either or is defined in an and" Page 7, clause 15. Change title to "Exceptions and IEEE arithmetic". Page 7, 15, line 5. After "IEEE_EXCEPTIONS" add "and everything that is public in IEEE_EXCEPTIONS is public in IEEE_ARITHMETIC". Page 8, end of clause 15. Add note: The types and procedures defined in these modules are not themselves intrinsic. Page 8, 15.1, lines 2-3. Delete sentence "No operation is defined for them and only intrinsic assignment is available for them." Page 8, 15.1, line 20+. Add o The elemental operator == for two values of one of these types to return .TRUE. if the values are the same and .FALSE. otherwise. o The elemental operator /= for two values of one of these types to return .TRUE. if the values differ and .FALSE. otherwise. Page 9, 15.2, lines 23-24. Delete sentence "If any exception is signaling when the program terminates, the processor shall issue a warning on the unit identified by "*" in a WRITE statement, indicating which conditions are signaling." Page 9, 15.2, line 26+. Add new para: Evaluation of a specification expression may cause an exception to signal. Page 9, 15.2, lines 32-33. Delete "to the evaluation of specification expressions on entry to a procedure," and delete "," before "and to". Page 9, last paragragh, lines 2-3. Change "a process" to "an operation" and "process" to "operation". Page 10, line 6. Change "a process" to "an operation". Page 11, 15.6, line 3. Change '+Inf and -Inf' to '+infinity and -infinity'. Make similar changes elsewhere. Page 11, 15.6, line 4+. Add new paragraph: In this standard, the term <> is used for values that are not in one of these exceptional classes. Page 11, 15.7, line 10+. Add paragraphs: The inquiry function IEEE_SUPPORT_NAN is provided to inquire whether the processor supports IEEE NaNs. Where these are supported, their behaviour for unary and binary operations, including those defined by intrinsic functions and by functions in intrinsic modules, is as specified in the IEEE standard. The inquiry function IEEE_SUPPORT_INF is provided to inquire whether the processor supports IEEE infinities. Where these are supported, their behaviour for unary and binary operations, including those defined by intrinsic functions and by functions in intrinsic modules, is as specified in the IEEE standard. Page 12, 15.8, line 1. After "procedures", add "defined in the modules". Page 12, 15.8.1, line 5. Remove bullet. Page 12, end of 15.8.2. Add note: If X or Y has a value that is an infinity or a NaN, the result shall be consistent with the general rules in sections 6.1 and 6.2 of the IEEE standard. For example, the result for an infinity shall be constructed as the limiting case of the result with a value of arbitrarily large magnitude, when such a limit exists. Page 13, 15.9. Add: In this section, the procedures are described in detail. The procedure names are generic and are not specific. All the functions are pure. In the examples, it is assumed that the processor supports IEEE arithmetic for default real. Note: It is intended that processors should not check a condition given in a paragragh labeled <> at compile time, but rather should rely on the programmer writing code such as IF (IEEE_SUPPORT_DATATYPE(X)) THEN C = IEEE_CLASS(X) ELSE : END IF to avoid a call ever being made on a processor for which the condition is violated. Page 13, 15.9.1, line 3. Replace by Argument. X shall be of type real. Restriction. A program is prohibited from invoking this procedure if IEEE_SUPPORT_DATATYPE(X) has the value false. Apply similar edits to IEEE_COPY_SIGN, IEEE_IS_FINITE, IEEE_IS_NAN, IEEE_IS_NEGATIVE, IEEE_IS_NORMAL, IEEE_LOGB, IEEE_NEXT_AFTER, IEEE_REM, IEEE_RINT, IEEE_SCALB, IEEE_SET_ROUNDING_MODE, IEEE_SUPPORT_DENORMAL, IEEE_SUPPORT_DIVIDE, IEEE_SUPPORT_INF, IEEE_SUPPORT_NAN, IEEE_SUPPORT_SQRT, IEEE_UNORDERED, IEEE_VALUE. In the case of IEEE_SET_ROUNDING_MODE, also change 'any' to 'some'. Page 14, 15.9.3, last line. Change "overflow" to "IEEE_OVERFLOW". Page 14, 15.9.4, line 7. Delete "scalar and". Page 14, 15.9.4, line 9. Change "overflow" to "IEEE_OVERFLOW". Page 17, line 4. After the first "If" add "X is finite and" Page 17, lines 6-7, Case (ii). Delete "IEEE_DIVIDE_BY_ZERO signals and". After "otherwise" add "; IEEE_DIVIDE_BY_ZERO signals". Page 17, lines 8-11. Delete "Case (iii) ... values." Page 17, 15.9.12, Case (ii), lines 2-3. Delete "If either ... input Nans." Page 17, 15.9.12, Case (ii), lines 3-4. Change "Overflow" to "IEEE_OVERFLOW". Change "underflow" to "IEEE_UNDERFLOW". Page 17, 15.9.13, Result Characteristics. Change "Same as X" to "Real with the kind type parameter of whichever argument has the greater precision". Page 18, 15.9.15, Case (i). Change "within ... numbers" to "representable as a normal number". Page 18, 15.9.15, Case (ii). After the first "If" add "X is finite and". Page 18, 15.9.15, Case (ii). After "small" add "and there is loss of accuracy". Page 18, 15.9.15, Case (ii). Change "overflow" to "IEEE_OVERFLOW". Page 18, 15.9.15, Case (iii). Change "underflow" to "IEEE_UNDERFLOW". Page 18, 15.9.15, after Case (iii). Add Case(iv): If X is infinite, the result is the same as X; no exception signals. Page 19, 15.9.17, last line. Change "overflow" to "IEEE_OVERFLOW". Page 19, 15.9.18, lines 9-10. Delete "The processor ... it does." and add Restriction. A program is prohibited from invoking this procedure if IEEE_SUPPORT_HALTING(FLAG) has the value false. Page 20, 15.9.21, Result Value, line 3. Add "binary" before "operations of +". Page 21, line 8. Change "underflow" to "IEEE_UNDERFLOW". Page 22, line 6. Add "Here, support shall include the ability to change the mode by CALL IEEE_SET_HALTING(FLAG)." Page 22, 15.9.28, line 5+. Add Restriction. A program is prohibited from invoking this procedure with X present if IEEE_SUPPORT_DATATYPE(X) has the value false. Page 24, line 3. Change "Same as X" to "Default logical". Page 24, 15.10, line 5. Change line to LOGICAL :: MATRIX_ERROR = .FALSE. Page 25, line 17. Change "overflow" to "IEEE_OVERFLOW". Page 27, line 2. Change "overflow" to "IEEE_OVERFLOW". Page 27, line 3. Change "underflow" to "IEEE_UNDERFLOW". Page 27. Add Annex A: The differences between this Technical Report and its first edition are listed in the document N1368 in the ftp directory ftp.nag.co.uk/sc22wg5 The differences between the semantics and syntax described in this Technical Report and those incorporated in the current draft of the next revision of ISO/IEC 1539-1:1997 are listed in Standing Document 7 (SD7), which is accessible from the same directory. These changes have proved necessary for the reasons explained in the final paragraph of the Foreword. The documents are also accessible through the www address http://anubis.dkuug.dk/JTC1/SC22