(j3.2006) (SC22WG5.5299) [ukfortran] Did we intend to prohibit this?
Van Snyder
Van.Snyder
Thu Jul 3 13:56:53 EDT 2014
On Thu, 2014-07-03 at 11:14 +0100, N.M. Maclaren wrote:
> On Jul 3 2014, Van Snyder wrote:
>
> >As far as I can tell from looking at 7.1.12, the only function from
> >IEEE_Arithmetic that's allowed in a constant expression is
> >IEEE_Selected_Real_Kind.
> >
> >Did we intend to prohibit all the others?
> >
> >Is there a problem with admitting the inquiry functions, and admitting
> >the others provided their arguments are constant expressions?
>
> One issue that would have to be considered is what requirements we would
> place on compile- and run-time options to control the modes. IEEE 754
> remains a very assembler-level specification, does not map well even
> to C, and its arithmetic model is seriously incompatible with Fortran's.
> This is probably resolvable, but isn't just a matter of relaxing the
> restrictions. I, for one, lack the enthusiasm to tackle this.
The reason this question arose was an attempt at the following:
integer, parameter :: RK = kind(1.0e0)
real(rk), parameter :: SNaN = merge( IEEE_Value(1.0_rk,IEEE_Signaling_NaN), &
& 0.0_rk, IEEE_Support_DataType(1.0_rk) )
Are there at least a few functions from IEEE_Arithmetic, and the two
inquiry functions from IEEE_Exceptions, that we could admit into
constant expressions? The functions that don't depend upon modes,
especially the inquiry functions, ought not to be troublesome.
While looking at this, I noticed that IEEE_Is_Finite appears twice in
Table 14.1. Is there a reason for this, or is it just a typo?
> Regards,
> Nick.
>
More information about the J3
mailing list