User`s guide
Developing an Application [3]
A number with a biased exponent of 2047 (0x7FF) is a special floating-point
number, known as a SpecialFloat64 on the Cray XMT. If all the fraction bits are
zero, the value of the number is plus or minus infinity. Infinity generally occurs in
calculations as a result of an overflow or division by zero. For example, 1.0/0.0 is
positive infinity, while 1.e300*-1.e300 is negative infinity.
Calculations such as 0.0/0.0 create a result that is called not a number (NaN).
Any 64-bit floating-point number with a biased exponent of 0x7FF and a non-zero
fraction represents NaN. After NaN enters a computation, it persists through addition,
subtraction, multiplication, and division. When a calculation produces a NaN, it
indicates an error in your program or data.
In arithmetic comparisons, NaN is not equal to any number, including itself. NaN is
neither less than nor greater than any number. In fact, such comparisons raise an
exception when one of the numbers being compared is NaN. This implies that the
opposite of less than is not greater than but greater than, equal to, or unordered.
In this case, unordered allows for the possibility that one of the numbers in the
comparison is NaN. The Cray XMT hardware supports comparisons such as less
than, equal to, or unordered, and the compilers use these comparisons as necessary
when reversing the sense of a test.
There are two representations of zero in the Cray XMT hardware. The number
0x0000000000000000 represents +0.0 while 0x8000000000000000
represents -0.0. Although +0.0 and -0.0 appear to be equal to each other, you
can distinguish between them when using them in computations. In particular,
1.0/0.0 equals positive infinity while 1.0/-0.0 equals negative infinity. These
values obey computational rules under multiplication, as shown in the following
example.
0.0*(-1.) = -0.0
(-0.0)*(-1.0) = 0.0
and so on.
For any finite nonzero x$, x - x = +0.0. This implies that b-ais not
equivalent to -(a - b). For computations with zero, the following rules hold:
+0.0 - (+0.0) = +0.0 - (-0.0) = (-0.0) - (-0.0) = +0.0
However...
-0.0 - (+0.0) = -0.0
Underflow in the Cray XMT hardware is gradual in accordance with the IEEE
754 standard. Computations that underflow, producing a rounded result smaller in
magnitude than 0x0010000000000000, or about 2.225e-308, do not all flush
to zero. If the result has an absolute value greater than or equal to min_denorm,
such as 0x0000000000000001, or about 4.94e-324,itisasubnormal number.
A subnormal number is one with a zero-biased exponent and a nonzero fraction such
as 0x0000000000000001 or 0x800FFFFFFFFFFFFF. The absolute value for
such a subnormal number is the following:
(0.0 + fraction) >> 1022
S–2479–20 27