From jkr@jkr.cc.rl.ac.uk  Fri Jun 25 17:59:49 1999
Received: from nameserv.rl.ac.uk (nameserv.rl.ac.uk [130.246.135.129])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id RAA73122
	for <sc22wg5@dkuug.dk>; Fri, 25 Jun 1999 17:59:49 +0200 (CEST)
	(envelope-from jkr@jkr.cc.rl.ac.uk)
Received: from jkr.cc.rl.ac.uk (jkr.cc.rl.ac.uk [130.246.8.20])
	by nameserv.rl.ac.uk (8.8.8/8.8.8) with ESMTP id QAA00319
	for <sc22wg5@dkuug.dk>; Fri, 25 Jun 1999 16:59:33 +0100
Received: (from jkr@localhost)
	by jkr.cc.rl.ac.uk (8.8.8/8.8.8) id RAA29398
	for sc22wg5@dkuug.dk; Fri, 25 Jun 1999 17:00:34 +0100 (BST)
Date: Fri, 25 Jun 1999 17:00:34 +0100 (BST)
From: John Reid <J.Reid@letterbox.rl.ac.uk>
Message-Id: <199906251600.RAA29398@jkr.cc.rl.ac.uk>
To: sc22wg5@dkuug.dk
Subject: IEEE TR, second edition
X-Sun-Charset: US-ASCII

As requested by WG5, I have constructed a draft second edition of the 
IEEE TR and a list of changes from the first edition. 

For the moment, I have put it on my ftp server:
      ftp.numerical.rl.ac.uk
in the file
      pub/wg5/ieeetr2.ps.gz
Any comments will be gratefully received.

I have also constructed a list of changes from the first edition, which is
appended. Some changes differ slightly from what was agreed in Cadarache,
usually because Rich Maine made slight changes in editing 007. Also, some
changes are new. These originate from Keith Bierman and from notes I found on
my return. All different and additional edits are flagged with an asterisk in
the list of edits that follows. 

Best wishes,

John Reid. 

.........................................................................


                                                                    N1xxx
Date:	 25 June 1999
To:	 WG5
From:	 John Reid
Subject: IEEE TR

The second edition of TR 15580 corresponds to the first edit 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 "<intrinsic function>" to "<function> that is either
  <intrinsic> or is defined in an <intrinsic module> 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 "<intrinsic function>" to "<function> that is either 
  <intrinsic> or is defined in an <intrinsic module> 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 "process" to "operation".

*Page 11, 15.6, line 4+. Add new paragraph:
   In this standard, the term <<normal>> 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.

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.

Page 14, 15.9.3, last line. Change "overflow" to "IEEE_OVERFLOW".

*Page 14, 15.9.4, line 7. Delete "be 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 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:

The differences between this Technical Report its first edition are
listed in
     ftp.nag.co.uk/sc22wg5/Nxxxx 
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
     ftp.nag.co.uk/sc22wg5/TR155580diffs 
These differences have proved necessary for the reasons explained in 
the final paragraph of the Foreword. 

The lists are also accessible through the www address
      http://www.etrc.ox.ac.uk/SC22WG5 
