To: J3 J3/18-257r2 From: Dan Nagle Subject: log and friends Date: 2018-October-17 I Introduction At 215, J3 agreed, and at 216 WG5 concurred, to add the following to the iso_fortran_env intrinsic module. logical8 - an integer constant whose value is the kind value of a logical whose storage size is 8 bits logical16 - an integer constant whose value is the kind value of a logical whose storage size is 16 bits logical32 - an integer constant whose value is the kind value of a logical whose storage size is 32 bits logical64 - an integer constant whose value is the kind value of alogical whose storage size is 64 bits real16 - an integer constant whose value is the kind value of a real whose storage size is 16 bits II Use-cases Presently, there is no way to get these kind values, other than trying to decode the logical_kinds array. However, this array is unsorted, and so it is difficult for the purpose. Newer hardware now supports a 16-bit real (for use in AI work). This is missing from the current real32, real64, real128 set. III What I have in mind Add logical[8-64] and real16 to iso_fortran_env. IV (Rough) Requirements iso_fortran_env is expanded to include: logical8, logical16, logical32, logical64 The values of these default integer scalar constants shall be those of the kind type parameters that specify an LOGICAL type whose storage size expressed in bits is 8, 16, 32, and 64, respectively. If, for any of these constants, the processor supports more than one kind of that size, it is processor dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be equal to -2 if the processor supports a kind with larger size and -1 otherwise. real16 The value of this default integer scalar named constant shall be that of the kind type parameters that specify a REAL type whose storage size expressed in bits is 16. If, for this constant, the processor supports more than one kind of that size, it is processor dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be equal to -2 if the processor supports kinds of a larger size and -1 otherwise.