From jkr@jkr.cc.rl.ac.uk  Mon Feb 19 16:42:32 2001
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 QAA65084
	for <SC22WG5@dkuug.dk>; Mon, 19 Feb 2001 16:42:31 +0100 (CET)
	(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 PAA17414
	for <SC22WG5@dkuug.dk>; Mon, 19 Feb 2001 15:42:30 GMT
Received: (from jkr@localhost)
	by jkr.cc.rl.ac.uk (8.8.8+Sun/8.8.8) id PAA20703;
	Mon, 19 Feb 2001 15:44:18 GMT
Date: Mon, 19 Feb 2001 15:44:18 GMT
From: John Reid <jkr@rl.ac.uk>
Message-Id: <200102191544.PAA20703@jkr.cc.rl.ac.uk>
To: SC22WG5@dkuug.dk, jkr-SC22WG5@jkr.cc.rl.ac.uk
Subject: Iterpretation 12 (ANINT and NINT): Draft response
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"


NUMBER: 000012
TITLE: Evaluation of Intrinsic Procedures
KEYWORDS: Algorithm, Mathematical, Computational
DEFECT TYPE: Erratum
STATUS: J3 consideration in progress

QUESTION:
1.  When the standard specifies an algorithm for computing a
    mathematical procedure, must a processor use the specified
    algorithm?

    Example: ANINT is defined as INT (A + 0.5).  On some processors
             ANINT (16 000 001.0) evaluates to 16 000 002.0 using
             this algorithm.

2.  May a processor return a mathematically equivalent result in the
    evaluation of a numeric intrinsic procedure?

    Example: If ANINT (16 000 001.0) can be computed as the more
             expected 16 000 001.0, may a processor do so?

ANSWER:
1.  No, a processor is not required to use the algorithm from the
    standard.

2.  Yes, a processor may return the mathematically equivalent result
    in the evaluation of any numeric intrinsic procedure.

DISCUSSION:
The use of an algorithm in the definitions for intrinsic procedures
is intended to describe the end result.  It is not intended to
require that a processor use a particular method of achieving that
result.  Thus, an algorithm specifies the mathematical results, not
the computational results, of the evaluation of intrinsic procedures.

This standard does not require a processor to use a particular
accuracy or precision.  Section 1.4, "Exclusions", states in part:

    "This standard does not specify: . . .
     (6)  The physical properties of the representation of quantities
          and the method of rounding, approximating, or computing
          numeric values on a particular processor." [1:26, 1:37-38]

The edits correct the definitions of the results for the intrinsic
functions ANINT and NINT to be expressed in mathematical terms. 

EDITS: 

On page 231, subclause 13.14.10, Result Value paragraph [231:16-17].
Replace by
  <Result Value.> The result is the integer nearest A, or if there are
  two integers equally near A, the result is whichever such integer has
  the greater magnitude.

On page 259, subclause 13.14.77, Result Value paragraph [259:9-10].
Replace by
  <Result Value.> The result is the integer nearest A, or if there are
  two integers equally near A, the result is whichever such integer has
  the greater magnitude.


SUBMITTED BY: Keith H. Bierman

HISTORY:  95-247r1  m134  Submitted as F90 interp 000202 with proposed
                          response, approved 9-4, subsumes F90 interp
                          000200.
          95-256    m134  Ballot failed, 10-6
          95-260    m135  Proposed response, no action
          96-023    m136  Proposed response, no action
          96-054    m137  Proposed response, no action
          96-117    m138  Proposed response, no action
          97-259r1  m143  Re-submitted as F95 interp 000012 with
                          proposed response
          00-214    m153  Passed unanimously
          00-254    m154  Passed J3 letter ballot
          00-268    m154  Failed WG5 letter ballot (N1403)
