From jkr@jkr.cc.rl.ac.uk  Tue Mar 28 15:10:46 2000
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 PAA16354
	for <SC22WG5@dkuug.dk>; Tue, 28 Mar 2000 15:10:45 +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 OAA20044
	for <SC22WG5@dkuug.dk>; Tue, 28 Mar 2000 14:10:44 +0100
Received: (from jkr@localhost)
	by jkr.cc.rl.ac.uk (8.8.8+Sun/8.8.8) id OAA11340
	for SC22WG5@dkuug.dk; Tue, 28 Mar 2000 14:11:50 +0100 (BST)
Date: Tue, 28 Mar 2000 14:11:50 +0100 (BST)
From: John Reid <J.Reid@letterbox.rl.ac.uk>
Message-Id: <200003281311.OAA11340@jkr.cc.rl.ac.uk>
To: SC22WG5@dkuug.dk
Subject: Interpretation 005
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

Date: 28th March 2000
To: J3
From: John Reid
Subject: Interpretation 005

Here are drafts for the ANSWER and EDITS sections of 005.  For your
convenience, the current 005 is attached.

ANSWER:
The intention is that the value -1 be returned if the range can be
supported but the precision cannot,  the value -2 be returned if the
precision can be supported but the range cannot, and the value -3 be
returned if neither the precision nor the range can be supported.
Provision needs to be made for the case where each can be supported,
but not in combination. With the edit below, the returned values for
the four invocations will be 16, -4, -1, -1.

EDITS:
Page 266, Clause 13.14.95, lines 11-14 (266: 26-29). Replace 'The
result is -1 ... is supported.' by 'The result is -1 if the processor
does not support a real data type with a precision greater than or
equal to P but does support a real data type with an exponent range
greater than or equal to R, -2 if the processor does not support a real
data type with an exponent range greater than or equal to R but does
support a real data type with a precision greater than or equal to P,
-3 if the processor supports no real data type with either of these
properties, and -4 if the processor supports real data types for each
separately but not together.'


-------------------------------------------------------------------------------

NUMBER: 000005
TITLE: Value returned by SELECTED_REAL_KIND
KEYWORDS: SELECTED_REAL_KIND
DEFECT TYPE: Interpretation
STATUS: X3J3 consideration in progress

QUESTION:

The SELECTED_REAL_KIND intrinsic function does not appear to cover one specific
case for real data types.  Consider the following precisions and ranges for a
particular model:

    KIND TYPE    PRECISION       RANGE
       4            6             37
       8           15            307
      16           31            291

A test case for a system with this model is:

      PRINT *, 'selrealkind(31,291) = ', SELECTED_REAL_KIND(P=31,R=291) 
      PRINT *, 'selrealkind(31,292) = ', SELECTED_REAL_KIND(P=31,R=292) 
      PRINT *, 'selrealkind(32,291) = ', SELECTED_REAL_KIND(P=32,R=291) 
      PRINT *, 'selrealkind(32,292) = ', SELECTED_REAL_KIND(P=32,R=292) 
      END

The Result Value section of the description of SELECTED_REAL_KIND clearly
describes the result value when the values of P and R are within the ranges
specified for the given implementation of the real data type model.  It further
describes the values to be returned by SELECTED_REAL_KIND when a value of P or
R is not within the range of model numbers specified by the implementation.
>From the text in the Result Value section, the following may be determined:
 
* The reference to SELECTED_REAL_KIND(P=31,R=291) (first PRINT line) should
  return the (kind type parameter) value 16.

* The third and fourth SELECTED_REAL_KIND references should return -1 since
  the PRECISION argument is outside the set of allowed precision values.

However, the value returned by the second reference to SELECTED_REAL_KIND is
unknown since it does not appear to be covered by the wording of the Result
Value paragraph of section 13.14.95.

1. What should the processor return for the value of the SELECTED_REAL_KIND
   intrinsic function when it does not have a single data type that satisfies
    both the P and R values?

2. In particular, given the precision and range values shown above, what should
   the processor return for the last three invocations of the
   SELECTED_REAL_KIND intrinsic function?

ANSWER:

EDITS:

SUBMITTED BY:  Larry Rolison / Joanne Brixius
HISTORY:  J3/97-241 m143 submitted
-------------------------------------------------------------------------------
