J3/06-223 To: J3 From: Bill Long Subject: C13 - UTI 61 : BITS_KIND Date: 28-jul-2006 --------------------- Unresolved Technical Issue 61 (page 361) recommends removing from the result value description of BITS_KIND the sentences about double complex and non-default integer arguments. Reply: Removing the sentence about double complex is fine. It is also the case that the final sentence of the result value description provides a duplicate specification for the case of double precision. Edits are provided to fix both of these issues. The argument for non-default integers is less convincing. The specific example of legacy Cray hardware is faulty. It is true that, by default, integer multiplication and division operations were done with 46 bits of precision using the floating point units. However, BIT_SIZE for these objects was still returned as 64 because for the purposes of the bit manipulation routines, such as IAND, all 64 bits of the words were used. All 64 bits were used for integer add and subtract as well, but that is not the relevant issue. BIT_SIZE for an integer is related only to the behavior when the object is being used in the context where it is treated as sequence of bits in the bit manipulation routines. This has a detectable effect for operations such as a circular shift. The goal for BITS_KIND with an integer argument is to return a bits kind value that will specify a bits object with the same bit manipulation characteristics as the integer argument. Since the integer type is special in that the bits manipuation routines are defined for integer arguments, singling out integer arguments to BITS_KIND is reasonable. The argument that BIT_SIZE(default_integer) is not necessarily the same as NUMERIC_STORAGE size seems theoretical, as I know of no actual implementation where this is the case. However, this issue can be circumvented by changing description of the result value for a default integer argument. Edits are provided for this. Edits: ------ [361:8] Replace "default integer, default real," with "default real". [361:10-11] Remove the sentence "If X is of type complex with the same kind type parameter as that of double precision, the result has the value 4 x NUMERIC_STORAGE_SIZE." [361:12] Replace "of type non-default integer" with "of type integer". [361:12-13] Replace "If X is of a non-default logical or non-default non-integer numeric type" with "Otherwise". [361:14] Replace "of that type and kind" with "of the type and kind of X".