22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DC Instruction—Binary Floating-Point Constants<br />

FLOAT DC DE+4'+46,–3.729,+473'<br />

Binary Floating-Point Constants—EB, DB, LB<br />

Binary floating-point numbers may be represented in any of three formats: short,<br />

long or extended. The short format is 4 bytes with a sign of one bit, an exponent of<br />

8 bits and a fraction of 23 bits. The long format is 8 bytes with a sign of one bit, an<br />

exponent of 11 bits and a fraction of 52 bits. The extended format is 16 bytes with<br />

a sign of one bit, an exponent of 15 bits and a fraction of 112 bits.<br />

There are five classes of binary floating-point data, including numeric and related<br />

nonnumeric entities. Each data item consists of a sign, an exponent and a<br />

significand. The exponent is biased such that all exponents are nonnegative<br />

unsigned numbers, and the minimum biased exponent is zero. The significand<br />

consists of an explicit fraction and an implicit unit bit to the left of the binary point.<br />

The sign bit is zero for plus and one for minus values.<br />

All finite nonzero numbers within the range permitted by a given format are<br />

normalized and have a unique representation. There are no unnormalized<br />

numbers, which might allow multiple representations for the same value, and there<br />

are no unnormalized arithmetic operations. Tiny numbers of a magnitude below the<br />

minimum normalized number in a given format are represented as denormalized<br />

numbers, because they imply a leading zero bit, but those values are also<br />

represented uniquely.<br />

The classes are:<br />

1. Zeros have a biased exponent of zero, a zero fraction and a sign. The implied<br />

unit bit is zero.<br />

2. Denormalized numbers have a biased exponent of zero and a nonzero fraction.<br />

The implied unit bit is zero.<br />

| The smallest denormalized numbers have approximate magnitudes 1.4 10**-45<br />

| (short format), 4.94 10**-324 (long format) and 6.5 10**-4966 (extended<br />

| format).<br />

3. Normalized numbers have a biased exponent greater than zero but less than<br />

| all ones. The implied unit bit is one and the fraction may have any value. The<br />

| largest normalized numbers have approximate magnitudes 3.4 10**38 (short<br />

| format), 1.8 10**308 (long format), and 1.2 10**4932 (extended format). The<br />

| smallest normalized numbers have approximate magnitudes 1.18 10**-38 (short<br />

| format), 2.23 10**-308 (long format), and 3.4 10**-4392 (extended format).<br />

4. An infinity is represented by a biased exponent of all ones and a zero fraction.<br />

5. A NaN (Not-a-Number) entity is represented by a biased exponent of all ones<br />

and a nonzero fraction. NaNs are produced in place of a numeric result after<br />

an invalid operation when there is no interruption. NaNs may also be used by<br />

the program to flag special operands, such as the contents of an uninitialized<br />

storage area. There are two types of NaNs, signaling and quiet. A signaling<br />

NaN (SNaN) is distinguished from the corresponding quiet NaN (QNaN) by the<br />

leftmost fraction bit: zero for the SNaN and one for QNaN. A special QNaN is<br />

supplied as the default result for an invalid-operation condition; it has a plus<br />

sign and a leftmost fraction bit of one, with the remaining fraction bits being set<br />

to zeros. Normally, QNaNs are just propagated during computations, so that<br />

they remain visible at the end. An SNaN operand causes an invalid operation<br />

exception.<br />

Chapter 5. Assembler Instruction Statements 167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!