(j3.2006) (SC22WG5.4773) [ukfortran] [Letter ballot 3 on Fortran 2008interpretations]

Van Snyder Van.Snyder
Fri Sep 14 14:13:48 EDT 2012


On Fri, 2012-09-14 at 17:48 +0900, Malcolm Cohen wrote:
> Van Snyder wrote:
> >My most fundamental objection to the interpretation is that it is
> >inconsistent with the requirements of 4.1.2, 4.2, and 13.7.2.  According
> >to 4.1.2 and 4.2, A type is characterized by a kind type parameter.  The
> >type and kind type parameter value together specify a set of valid
> >values.  According to 13.7.2, a function is required to return a value
> >that is a member of the set of valid values for the type and kind of its
> >result.  The interpretation violates this requirement.
> 
> That is simply not the case.  That is not what 13.7.2 says. either before or 
> after other interps changed that wording.

13.7.2 was a typo.  It ought to be 13.7.1p2.  F08/0008 replaces "outside
the range of values representable by objects of the specified type and
type parameters" at [325:8-9] with "not representable by objects of the
specified type and type parameters."

How can a value that does not meet the requirements of 4.1.2 and 4.2 be
representable by an object of the specified type and type parameters?

> Furthermore, even if it did, such an interpretation of the "valid values" 
> wording would not result in "better answers" but (in the vast majority of cases) 
> worse answers, quite apart from the effects on optimisation.

If one wants a "better answer," DO NOT wrap a double-precision real with
a REAL intrinsic with a KIND argument equal to KIND(0.0e0)!  The ONLY
reason for the latter is because one DOES WANT (!) a value that is a
member of the set of valid values for REAL(KIND(0.0e0)) :: ....

Patient: "Doctor, it hurts when I do this!"
Doctor:  "Don't do that!"

The "performance" argument is entirely bogus, and I will continue to
believe so until somebody shows me profiler results from a
representative set of real applications, not artfully contrived SPEC
benchmarks.

> Cheers,





More information about the J3 mailing list