J3/05-232 Date: 25-July-2005 To: J3 From: Bill Long Subject: Edits to support decimal reals References: Feature uk-002 -------------------------------------------------------------- Following are the edits to implement the uk-002 feature, support for reals with decimal internal representation. It adds a RADIX argument to selected_real_kind that allows support for any positive radix, which could include 10. All page and line numbers refer to j3/04-007. EDITS ..................................................................... In the Introduction section (page xiii), the list of new Fortran 2008 features should include Radix specification for real kinds. ..................................................................... In section 1.6 Compatibility, there are no changes needed. ..................................................................... 37:31-34. Replace the last 2 sentences of the first paragraph of subsection 4.4.2 with: "The decimal precision, decimal exponent range, and radix of an approximation method are returned by the intrinsic functions PRECISION (13.7.90), RANGE (13.7.96), and RADIX (13.7.93). The intrinsic function SELECTED_REAL_KIND (13.7.106) returns a kind value based on spcified precision, decimal range, and radix requirements." ..................................................................... In subsection 13.7.106 describing the SELECTED_REAL_KIND intrinsic, make these changes: 350:12. replace the argument list with "([P,R,RADIX])" 350:13-14. replace the Description with Returns a value of the kind type parameter of a real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX. 350:18+. add new argument: RADIX (optional) shall be scalar and of type integer 350:20 after the first sentence of Result Value, add a new sentence: If RADIX is absent, the result value is the same as if it were present with the value RADIX(0.0). 350:21-29. replace the current second sentence of the Result Value section with: The result has a value equal to a value of the kind type parameter of a real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, or if no such kind type parameter is available on the processor, the result is -1 if the processor does not support a real type with a precision greater than or equal to P but does support a real type with an exponent range greater than R and a radix equal to RADIX, -2 if the procssor does not support a real type with an exponent range greater than or equal to R but does support a real type with precision greater than or equal to P and a radix equal to RADIX, -3 if the processor supports no real type with either a precision greater than or equal to P or an exponent range greater than or equal to R but does support a real type with a radix equal to RADIX, -4 if the processor supports real types with a precision greater than or equal to P and a decimal range greater than or equal to R, but not together, and does support a radix equal to RADIX, and -5 if the processor does not support a real type with a radix equal to RADIX. ..................................................................... In subsection 14.10.17 describing the IEEE_SELECTED_REAL_KIND intrinsic, make these changes: 378:4. replace the argument list with "([P,R,RADIX])" 378:5-6. replace the first sentence of the Description with: Returns a value of the kind type parameter of an IEEE real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX. 378:11+. add new argument: RADIX (optional) shall be scalar and of type integer 378:13-17. replace the first sentence of Result Value with: If P or R is absent, the result value is the same as if it were present with the value zero. If RADIX is absent, the result value is the same as if it were present with the value RADIX(0.0). The result has a value equal to a value of the kind type parameter of an IEEE real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, or if no such kind type parameter is available on the processor, the result is -1 if the precision is not available for the specified radix and the radix is available, -2 if the exponent range is not available for the specified radix and the radix is available, -3 if neither the precision nor the exponent range is available for the specified radix and the radix is available, and -5 if the radix is not available. .....................................................................