Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Syntax of binary, decimal, and hexadecimal floating-point constants HLASM Language Reference SC26-4940-06 |
|
The syntax for coding binary, decimal, and hexadecimal floating-point
constants is:
Figure 1. DC instruction syntax
for floating point constants
>>-DC--+------------+--+-+-E-+--+---+-+--+--------------+-------> '-dup_factor-' | +-D-+ +-B-+ | '-program_type-' | '-L-' +-H-+ | | '-D-' | '-LQ-----------' .-,-----------------. V | >--+----------+----| nominal_value |-+------------------------->< '-modifier-' nominal_value (no type extension) .- + -. |--'--+-----+--value--+----------+--'---------------------------| '- - -' '-exponent-' nominal_value (type extension B) .- + -. .-R4-------. |--'--+-----+--value--+----------+--+----------+--'-------------| '- - -' '-exponent-' '-R--+-1-+-' +-5-+ +-6-+ '-7-' nominal_value (type extension H) .- + -. .-R1-------. |--'--+-----+--value--+----------+--+----------+--'-------------| '- - -' '-exponent-' '-R--+-4-+-' +-5-+ +-6-+ '-7-' nominal_value (type extension D) .- + -. .-R8--------. |--'--+-----+--value--+----------+--+-----------+--'------------| '- - -' '-exponent-' '-R--+-9--+-' +-10-+ +-11-+ +-12-+ +-13-+ +-14-+ '-15-'
Note: As binary floating-point does not support scaling,
the scale modifier is ignored and a warning message issued if the
scaling modifier is specified when defining a binary floating-point
constant. The H type extension causes HLASM to use a different conversion
algorithm for hexadecimal floating-point data. The results are correctly
rounded for all values. Without the H type extension, some rare values
are in error by one unit in the last place.
Conversion to binary floating-pointFor decimal to binary floating-point conversion, the assembler conforms to ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating-Point Arithmetic, dated August 12, 1985, with the following differences: exception status flags are not provided and traps are not supported. Conversion of values within the represented range is correctly rounded. Conversion of values outside the represented range is as follows. If the resultant value before rounding is larger in magnitude than MAX (the maximum allowed value) as represented in the specified length, then, depending on the rounding mode, either MAX or infinity is generated, along with a warning message. If the resultant nonzero value is less than Dmin (the minimum allowed value) as represented in the specified length, then, depending on the rounding mode, either Dmin or zero is generated, along with a warning message. |
Copyright IBM Corporation 1990, 2014
|