J3/99-167r1 Date: 9th June 1999 To: J3 From: Dick Hendrickson and John Reid Subject: Edits re IEEE modules (cont) We propose the following edits: 20. [xv:20] After "7, 13" add ", 15". [xvi:39+] Add paragraph: Section 15 (Exceptions and IEEE arithmetic) describes intrinsic modules to provide support for the five exceptions of the IEEE standard for floating-point arithmetic and for other features of the IEEE standard. A processor is permitted to provide partial support; there are facilities for enquiring about which features are supported or for requiring support of certain features. [381:1-2] Change title to "Exceptions and IEEE arithmetic". 21. [143:23+] 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. 22. [385:37]. Delete the sentence "The dummy arguments of the functions have INTENT(IN)." 23. [387:12+] 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 reals are supported with IEEE arithmetic. 24. [385:12+] Add new paragraph: In this standard, the term <> is used for other values. Also, add an index entry for "normal". 25. [383:7-9] Subject to approval by WG5, 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." 26. Do not add an extra procedure for discovering the exception states have been stored for all the procedures in the current call chain. This will be difficult to write in the language of the standard and is a 'creeping goodie' which we feel should be resisted. 27. [388:10] Change "overflow" to "IEEE_OVERFLOW". [393:1] Change "overflow" to "IEEE_OVERFLOW". [395:6] Change "underflow" to "IEEE_UNDERFLOW". [400:31] Change "overflow" to "IEEE_OVERFLOW". [402:15] Change "overflow" to "IEEE_OVERFLOW". [402:16] Change "underflow" to "IEEE_UNDERFLOW". 28. We need to add the operators == and /= for the types of IEEE_ARITHMETIC in order to make use of values of these types. [381:43-44] Delete sentence "No operation is defined for them and only intrinsic assignment is available for them." [382:18+] 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. 29. We need to say that any intrinsic procedure or procedure in an intrinsic module behaves in a way that is consistent with the IEEE standard when presented with a NaN or an infinity as an argument. It is undesirable to spell out the details in one or two cases. [385:29+] 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. [390:34-36] Delete "Case (iii) ... quiet Nan." [391:10-11] Delete "If either ... input Nans." 30. We need to ensure that code such as if(ieee_support_datatype(x)) then c = ieee_class(x) else : does not fail at compile time on a machine that does not support ieee data. To fix this: [387:16-17] Delete "and such that IEEE_SUPPORT_DATATYPE(X) has the value true." [387:19] Change "The" to "Case (i) If IEEE_SUPPORT_DATATYPE(X) has the value true, the". [387:28+] Add "Case(ii) Otherwise, the result is processor dependent". Apply similar edits to IEEE_COPY_SIGN, IEEE_IS_FINITE, IEEE_IS_NAN, IEEE_IS_NEGATIVE, IEEE_IS_NORMAL, IEEE_REM, IEEE_RINT, IEEE_UNORDERED, IEEE_VALUE. Such edits are needed for other procedures, but more time is needed to prepare them.