\documentclass[nocolor,memo]{j3}
\renewcommand{\hdate}{14 April 2004}
\renewcommand{\vers}{J3/04-283}
\usepackage{lineno}
\usepackage{longtable}
\usepackage{xr}
\externaldocument{007}
\input pdftest
\begin{document}
\vspace{-10pt}
\begin{tabbing}
Subject: \hspace*{0.25in}\=Interpretation request: Representation method
of result of REAL\\
From: \>Van Snyder\\
\end{tabbing}
\pagewiselinenumbers
\leftlinenumbers
\linenumbers*
\section*{Number}
TBD
\section*{Title}
Representation method of result of REAL.
\section*{Keywords}
``Representation method'' KIND REAL.
\section*{Defect type}
Interpretation.
\section*{Status}
J3 consideration in progress.
\section*{Questions}
Subclause numbers refer to 97-007r2.
The second and third sentences of subclause 4.3.1.2 are
\begin{quote}
A processor shall provide two or more {\bf approximation methods} that
define sets of values for data of type real. Each such method has a {\bf
representation method} and is characterized by a value for a type
parameter called the {\tt kind} type parameter.
\end{quote}
1. Does this imply that there is a one-to-one correspondence between
kind type parameter values and representation methods?
Since the second quoted sentence says ``a value,'' not ``some values,''
assume the answer to this question is ``yes.''
Subclause 7.1.4.2 specifies the type and kind type paramter value for the
result of an operation.
2. Is a processor allowed to use a representation method that corresponds
to a different kind type parameter value of the same type, or no kind
type parameter value, at least if neither the precision nor exponent
range of the different representation method is less than the one
specified in 7.1.4.2?
Subclause 7.1.4.1 specifies the type and kind type paramter value for a
variable.
3. Is a processor allowed to use a representation method that corresponds
to a different kind type parameter value of the same type, or no kind
type parameter value, at least if neither the precision nor exponent
range of the different representation method is less than the one
specified in 7.1.4.1?
Subclause 7.1.4.1 specifies the type and kind type paramter value for a
result of a function.
4. Is a processor allowed to use a representation method that corresponds
to a different kind type parameter value of the same type, or no kind
type parameter value, at least if neither the precision nor exponent
range of the different representation method is less than the one
specified in 7.1.4.1?
Subclause 13.14.28 specifies that the result of DBLE is the same as the
result of REAL with a KIND argument having the value KIND(0.0d0).
Subclause 13.14.88 specifies that the kind type parameter value of the
result of REAL is that specified by the KIND argument.
5. Is a processor allowed to use a representation method for the result
that corresponds to a different kind type parameter value of the same
type, or no kind type parameter value, at least if neither the precision
nor exponent range of the different representation method is less than
the one specified in 13.14.88?
\section*{Answers}
1. Yes, but there should be exceptions, to allow the recommended answers
for the questions below.
2. No, but it probably ought to be yes. Otherwise, a processor cannot
retain intermediate results of expression evaluation in registers that
have additional range or precision.
3. No, but it probably ought to be yes. Otherwise, inter-statement
optimizations that result in leaving expression results in registers that
have additional range or precision from one statement to another, that
is, those in which stores are eliminated, would be prohibited.
4. No, but it probably ought to be yes, at least in limited
circumstances. Otherwise, if the answer to Question 2 is as specified
above, a function reference that is replaced by the text of the
function's body would have different performance and different results
from one automatically inlined by the processor.
5. No.
Ideally, the answers to Questions 2 through 5 should be ``it depends,''
and a construct should be provided to specify where ``it depends''
applies. But that would be a feature request, not an interpretation
request.
\section*{Edits}
In the third sentence in subclause 4.3.1.2, replace ``and'' by ``. Each
representation method'' and replace ``a value'' by ``at most one
value''. At the end of that sentence insert ``; a processor may provide
representation methods that are not characterized by any kind type
parameter value''. After that sentence, insert a new sentence: ``With
exceptions specified in 7.1.4.1 and 7.1.4.2, each kind type parameter
value specifies one representation method, which shall be used to
represent constants of the specified kind.''
In the first sentence of the second paragraph of 4.3.1.3, replace
``approximation'' by ``representation''. Replace the second sentence by
``A {\bf kind} type parameter may be specified for a complex entity; it
specifies the kind type parameter value for both the real and imaginary
parts.'' Then insert a new sentence: ``With the exceptions specified in
7.1.4.1, the representation method (4.3.1.2) of the real and imaginary
parts of the entity shall be the same as a constant of type real having
the same kind type parameter value.'' In the third sentence, insert
``value'' after ``parameter''.
At the end of each of subclauses 5.1.1.1, 5.1.1.2 and 5.1.2.3, insert the
same new sentence: ``With the exceptions specified in 7.1.4.1, the
representation method (4.3.1.2) of the entity shall be the same as a
constant having the same kind type parameter value.''
At the end of the first paragraph of subclause 7.1.4.1, add two new
sentences: ``If the variable is of type real, the representation method
(4.3.1.2) shall be the same as a constant having the same kind type
parameter value, or may be one that has greater exponent range, greater
precision, or both; this representation method may correspond to a
different kind type parameter, or to no kind type parameter. If the
primary is a reference to a functon other than REAL and the result is of
type real, the representation method shall be the same as a constant
having the same kind type parameter value, or may be one that has greater
exponent range, greater precision, or both; this representation method
may correspond to a different kind type parameter value, or to no kind
type parameter value.''
Ideally, the third paragraph of subclause 7.1.4.2 should be rewritten ---
it has been in the FCD --- or taken out and shot. Failing that, before
the sentence that begins ``In the case that both operands are of type
integer\dots'' insert a new sentence: ``If the type of the expression is
real, the representation method (4.3.1.2) shall be the same as a constant
having the same kind type parameter value, or may be one that has greater
exponent range, greater precision, or both; this representation method
may correspond to a different kind type parameter value, or to no kind
type parameter value.''
After the {\bf Result characteristics} section of subclause 13.14.20,
insert a note:
\begin{xnote}{13.7$\frac12$}
The repesentation method (4.3.1.2) of the real and imaginary parts of the
result shall be the same as a constant of type real having the same kind
type parameter value as the result.
\end{xnote}
After \emph{Case (ii)} in the {\bf Result characteristics} section of
subclause 13.14.88, insert a note:
\begin{xnote}{13.13$\frac12$}
The repesentation method (4.3.1.2) of the result shall be the same as a
constant of type real having the same kind type parameter value as the
result.
\end{xnote}
\section*{Submitted by}
Van Snyder
\section*{History}
168-wvs-009 m168
\label{lastpage}
\end{document}