J3/05-232r1
To: J3
From: Malcolm Cohen
Subject: Edits to support decimal reals
Date: 2005/08/10
References: 05-232, N1626/UK-002.
1. Introduction
This paper contains the specification, syntax and edits for item UK-002.
2. Specification.
Add a RADIX argument to SELECTED_REAL_KIND, to allow binary and decimal
formats that have the same decimal precision and exponent range to be
distinguished.
If this new RADIX argument is omitted, the current behaviour shall be
maintained; that is, no requirement on the radix of the returned real
kind is implied. This is consistent with the result of omitting P or
R (any precision or range is ok).
3. Syntax
New argument RADIX to SELECTED_REAL_KIND.
4. Various considerations
There is no need to mention this minor enhancement (one new argument to one
intrinsic function) in the Introduction of the standard.
This does not affect backwards compatibility.
The first paragraph of 4.4.2 "Real type" does not mention the RADIX
intrinsic, even though it mentions PRECISION and RANGE. This should be
corrected.
5. Edits to 04-007.
In 4.4.2 "Real type", first paragraph, [37:41-44], replace the last two
sentences ("The decimal precision ... range requirements.") with
"The decimal precision, decimal exponent range, and radix of an
approximation method are returned by the intrinsic functions
PRECISION (13.7.90), RANGE (13.7.96), and RADIX (13.7.93). The
intrinsic function SELECTED_REAL_KIND (13.7.106) returns a kind
value based on specified precision, range, and radix requirements."
In the title of 13.7.106 "SELECTED_REAL_KIND...", [350:12], after "P, R"
insert ", RADIX".
In 13.7.106, first paragraph "Description",
change "P digits and" to "P digits,"
after "at least R" insert ", and a radix of RADIX".
Making the whole description read
"Returns a value of the kind type parameter of a real type with
decimal precision of a least P digits, a decimal range of at
least R, and a radix of RADIX."
Same subclause, at the end of the "Arguments." paragraph, [350:18+], insert
"RADIX (optional) shall be scalar and of type integer."
Same subclause, "Result Value" paragraph, after the first sentence
"If ... value zero.", [350:21] insert
"If RADIX is absent, there is no requirement on the radix of the
selected kind."
Same subclause, same paragraph, replace the second sentence with
"The result has a value equal to a value of the kind type parameter of a
real type with decimal precision, as returned by the function PRECISION,
of at least P digits, a decimal exponent range, as returned by the
function RANGE, of at least R, and a radix, as returned by the function
RADIX, of RADIX, if such a kind type parameter is available on the
processor.
Otherwise, the result is -1 if the processor supports a real type
with radix RADIX and exponent range of at least R but not with
precision of at least P, -2 if the processor supports a real type
with radix RADIX and precision of at least P but not with exponent
range of at least R, -3 if the processor supports a real type with
radix RADIX but with neither precision of at least P nor exponent
range of at least R, -4 if the processor supports a real type with
radix RADIX and either precision of at least P or exponent range of
at least R but not both together, and -5 if the processor supports
no real type with radix RADIX."
In the title of 14.10.17 "IEEE_SELECTED_REAL_KIND...", [378:4], after "P, R"
insert ", RADIX".
If 14.10.17, first paragraph "Description", [378:5-6]
change "P digits and" to "P digits,"
after "at least R" insert ", and a radix of RADIX".
Making the whole description read
"Returns a value of the kind type parameter of an IEEE real type with
decimal precision of a least P digits, a decimal range of at least R,
and a radix of RADIX."
Same subclause, at the end of the "Arguments." paragraph, [378:11+], insert
"RADIX (optional) shall be scalar and of type integer."
Same subclause, "Result Value" paragraph, insert new first sentences
[378:13]
"If P or R is absent, the result value is the same as if it were
present with the value zero. If RADIX is absent, there is no
requirement on the radix of the selected kind."
Same subclause, "Result Value" paragraph, replace the first sentence
[378:13-17] with
"The result has a value equal to a value of the kind type parameter
of an IEEE real type with decimal precision, as returned by the
function PRECISION, of at least P digits, a decimal exponent range,
as returned by the function RANGE, of at least R, and a radix, as
returned by the function RADIX, of RADIX, if such a kind type
parameter is available on the processor.
Otherwise, the result is -1 if the processor supports a real type
with radix RADIX and exponent range of at least R but not with
precision of at least P, -2 if the processor supports a real type
with radix RADIX and precision of at least P but not with exponent
range of at least R, -3 if the processor supports a real type with
radix RADIX but with neither precision of at least P nor exponent
range of at least R, -4 if the processor supports a real type with
radix RADIX and either precision of at least P or exponent range of
at least R but not both together, and -5 if the processor supports
no real type with radix RADIX."
===END===