09-223
To: J3 Members
From: Stan Whitlock
Subject: J3 Fortran interp F03/0022
Date: 2009 February 23
Section 1. Instructions
Section 2 is the answer to the F2003 interp F03/0022.
Section 3 is the proposed edit to fix the problem raised in F03/0022
in F2008.
section 2.
----------------------------------------------------------------------
NUMBER: F03/0022
TITLE: Coexistence of IEEE and non-IEEE kinds
KEYWORDS: IEEE, kind
DEFECT TYPE: Interpretation
STATUS: J3 consideration in progress
QUESTION:
Is it allowed for a processor to have one or more real kinds for which
there is no IEEE support, while also having real kinds for which there
is IEEE support?
Much of the IEEE material appears to assume that a processor could
simultaneously support both IEEE and non-IEEE kinds. I thought this
was the intent. However, the first sentence of the second paragraph
in section 14 says that if IEEE_EXCEPTIONS or IEEE_ARITHMETIC is
accessible in a scoping unit, then IEEE_OVERFLOW and
IEEE_DIVIDE_BY_ZERO are supported in the scoping unit for *ALL*
[emphasis mine] kinds of real and complex data. This says to me
that if there is any kind of real for which the processor cannot
support IEEE_OVERFLOW or IEEE_DIVIDE_BY_ZERO, then pretty much none
of the IEEE stuff can be used on that processor at all; there
isn't much of the IEEE stuff that can be used without IEEE_ARITHMETIC
or IEEE_EXCEPTIONS. This seems draconian and unintended.
I speculate that this condition is intended to apply to all IEEE
real kinds rather than to all real kinds.
ANSWER:
Yes, this is allowed.
The requirement that IEEE_OVERFLOW and IEEE_DIVIDE_BY_ZERO be
supported for all kinds of real and complex data within that
scoping unit was unintentional.
Support of these two flags means that the exceptions can be detected
for real and complex kinds that are IEEE floating point data.
The Standard makes no claims about non-IEEE kinds.
An edit is provided to clarify this.
EDITS:
All edits pertain to 04-007.
Clause 14 "Exceptions and IEEE arithmetic", 1st sentence of 2nd
paragraph [363:9-10] replace
"for all kinds of real and complex data"
with
"for all kinds of real and complex IEEE floating point data"
SUBMITTED BY: Richard Maine
HISTORY: 04-419 m170 F03/0022 submitted
04-419r1 m170 Passed by J3 meeting
05-146 m171 Failed J3 letter ballot #10
09-223 m188 Revised answer
----------------------------------------------------------------------
Section 3.
Fix the problem reported in F2003 interp F03/0022 in F2008 as follows:
In 09-007, subclause 14.1 "General" of clause 14 "Exceptions and IEEE
arithmetic", 1st sentence of 2nd paragraph [407:9-10] replace
"for all kinds of real and complex data"
with
"for all kinds of real and complex IEEE floating point data"