ISO/IEC JTC1/SC22/WG5 N1352
Date: 17th June 1999
To: WG5
From: John Reid
Subject: Changes to IEEE TR
Make changes to TR 15580 that correspond to the following changes to
J3/99/007R1.
2. [385:36] After "procedures", add "defined in the modules".
4. Chapter 15 says near the top
"The module IEEE_ARITHMETIC behaves as if it contained a USE statement
for IEEE_EXCEPTIONS." This does not actually mean that anything from
IEEE_EXCEPTIONS is visible via IEEE_ARITHMETIC! (For instance, there
might be a global PRIVATE statement in the IEEE_ARITHMETIC module).
[381:7] Before "." add "and everything that is PUBLIC in IEEE_EXCEPTIONS is
PUBLIC in IEEE_ARITHMETIC".
6. [383:18-20] says "Similar rules apply to the evaluation of specification
expressions on entry to a procedure, to format processing,
and to intrinsic operations: no signaling flag shall be
set quiet and no quiet flag shall be set signaling because
of an intermediate calculation that does not affect the
result."
On the face of it, this means that
INTEGER X(100+INT(0.0*SQRT(-1.0)))
is not allowed to set the INVALID flag!
[383:11+]. Add new para:
Evaluation of a specification expression may cause an exception to signal.
[383:17-18] Delete "to the evaluation of specification expressions on entry to a
procedure," and delete "," before "and to".
7. IEEE_UNORDERED: result characteristics should be default logical.
[398:39] Change "Same as X" to "Default logical".
8. What happens with IEEE_SCALB(X) when X is infinite? It should be consistent
with 2**I*X for X infinite.
[392:8] After the first "If" add "X is finite and"
[392:12+] Add
Case(iv): If X is infinite, the result is the same as X; no exception
signals.
9. [392:7] should include the value zero.
[392:7] Change "within ... numbers" to "representable as a normal number".
10. To make the meaning clearer:
[390:32] Delete "IEEE_DIVIDE_BY_ZERO signals and".
[390:33] After "otherwise" add "; IEEE_DIVIDE_BY_ZERO signals".
11. For consistency:
[391:11] Change "Overflow" to "IEEE_OVERFLOW".
[391:12] Change "underflow" to "IEEE_UNDERFLOW".
12. For consistency with the IEEE standard, IEEE_REM should take its kind
from the argument with the greater precision (just like *, +, etc.).
[391:21] Change "Same as X" to "Real with the kind type parameter of
whichever argument has the greater precision".
13. Since IEEE_SUPPORT_DATATYPE does not require the support of negative
zero or Nan, it is confusing to include reference to unary -.
[394:18] Add "binary" before "operations".
14. [420:24] Change "and procedures" to "procedures, and modules".
[420:25] After "and" add "that".
[420:26] Add "Procedures and types defined in an intrinsic module are not
themselves intrinsic.".
15. [420:7] Change "" to " that is either
or is defined in an and"
16. [424:41] Change "" to " that is either
or is defined in an and"
17. [259:23+] Add paragraph: "Procedures and types defined in an intrinsic
module are not themselves intrinsic."
18. [381:40+] Add paragraph: "Procedures and types defined in an intrinsic
module are not themselves intrinsic."
20. [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.
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.
25. [383:7-9] 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."
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-38] Delete "Case (iii) ... quiet Nan." and note 15.7.
[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.
[387:16-17] 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_IO, IEEE_SUPPORT_NAN,
IEEE_SUPPORT_ROUNDING, IEEE_SUPPORT_SQRT, IEEE_UNORDERED, IEEE_VALUE.
[393:12-14] 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.
31. [396:27] Add "Here, support shall include the ability to change the mode by
CALL IEEE_SET_HALTING(FLAG)."
32. [383:26] Change "a process" to "an operation".
[383:28] Change "process" to "operation".
[383:37] Change "process" to "operation".