[J3] Revision of "inquiry function" definition is needed

Steven G. Kargl kargl at troutmask.apl.washington.edu
Fri Nov 22 17:07:51 EST 2019


Yes, that would work although it does seem a bit circular.

-- 
steve

On Fri, Nov 22, 2019 at 01:31:25PM -0800, Robert Corbett wrote:
> A better definition might be
> 
> An intrinsic function or function
> in an intrinsic module whose
> class is Inquiry function.
> 
> Bob Corbett
> 
> > On Nov 22, 2019, at 12:31 PM, Steven G. Kargl via J3 <j3 at mailman.j3-fortran.org> wrote:
> > 
> >> On Fri, Nov 22, 2019 at 02:59:15PM -0500, Vipul Parekh wrote:
> >> On Fri, Nov 22, 2019 at 1:51 PM Steven G. Kargl via J3
> >> <j3 at mailman.j3-fortran.org> wrote:
> >>> 
> >>> ..
> >>> IEEE_SUPPORT_DENORMAL is a "function in an intrinsic module" and
> >>> 17.11.49 (page 460) indicates "Class. Inquiry function".  In the
> >>> above valid Fortran code, the inquiry function has no arguments,
> >>> so does it have a result?
> >>> ..
> >> 
> >> For the purposes of such a consideration, this function should perhaps
> >> be viewed as having a dummy argument X which shall be of type real. It
> >> may be a scalar or an array?
> >> 
> >>    IEEE_SUPPORT_DENORMAL (X)
> >> 17
> >> 18 1 Description. Query subnormal number support.
> >> 19 2 Class. Inquiry function.
> >> 20 3 Argument. X shall be of type real. It may be a scalar or an array.
> >> 21 4 Result Characteristics. Default logical scalar.
> >> 22 5 Result Value.
> >> 23   Case (i): IEEE_SUPPORT_DENORMAL (X) has the value true if
> >> IEEE_SUPPORT_DATATYPE (X) has
> >> 24             the value true and the processor supports arithmetic
> >> operations and assignments with subnormal
> >> 25             numbers (biased exponent e = 0 and fraction f ?= 0, see
> >> ISO/IEC/IEEE 60559:2011, 3.2) for real
> >> 26             variables of the same kind type parameter as X;
> >> otherwise, it has the value false.
> >> 
> >> Vipul Parekh
> > 
> > Yes, I know the intent of 17.11.49 when IEEE_SUPPORT_DENORMAL() is
> > invoked without its optional argument.  The point is that by definition
> > (see 3.89) it seems that IEEE_SUPPORT_DENORMAL() is not an inquiry
> > function because it does not have one or more arguments.  The definition
> > provides no leeway for missing optional arguments.
> > 
> > Perhaps, a better definition is along the lines
> > 
> >  inquiry function
> >  intrinsic function, or function in an intrinsic module, whose result
> >  is a characteristic of the processor, and if one (or more) argument
> >  is present, then the result depends on the properties of one or more of
> >  its arguments instead of their values
> > 
> > 
> > -- 
> > Steve
> 

-- 
Steve


More information about the J3 mailing list