To: J3 J3/18-257r1 From: Dan Nagle Subject: log and friends Date: 2018-October-16 I Introduction At 215, J3 agreed, and at 216 WG5 concurred, to add the following to the iso_fortran_env intrinsic module. log8 - an integer constant whose value is the kind value of an 8-bit logical log16 - an integer constant whose value is the kind value of a 16-bit logical log32 - an integer constant whose value is the kind value of a 32-bit logical log64 - an integer constant whose value is the kind value of an 64-bit logical real16 - an integer constant whose value is the kind value of a 16-bit real II Use-cases At times, one wants the smallest, or the fastest, logical. 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 useless 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 log[8-64] and real16 to iso_fortran_env. IV (Rough) Requirements iso_fortran_env is expanded to include: log8, log16, log32, log64 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.