ATI CTM Guide v. 1.01
© 2006 Advanced Micro Devices, Inc.
42 Note on Floating Point
Dot products may lose precision in cases where the values to be added differ greatly in magnitude. For example, if
the two largest values to be added cancel exactly, and the next-largest value has a magnitude smaller by a factor of
2^25 or more, X1K FP will emit +0.0 rather than the sum of the two remaining components. IEEE is silent on the
behaviour of such fused operations, and it seems unlikely that this condition will manifest very often.
MIN and MAX operations return the second argument if either input is NaN (this is consistent with IEEE and SM3
specifications); infinite values compare as usual. If both inputs are +-0.0, MIN and MAX will return the second input
(consistent with IEEE and the SM3 spec)—as a result, MIN(+0, -0) == -0, and MIN(-0, +0) == +0.
CND and CMP operations return the second argument if either input is NaN; infinite values compare as usual. As
with the predicate compare operators, +0.0 and -0.0 are both "equal" to 0.
MIN, MAX, CND, and CMP are guaranteed to return one of their first two arguments. If you use
OMOD_DISABLED as well, then you will get a bit-exact representation of one of the first two arguments.
ALU operations usually enable the output modifier, which in turn standardizes NaN values and flushes denormal
results to zero. A MOV instruction which preserves the source bits may be implemented by setting
OMOD_DISABLED for the instruction and using the MAX(src, src) instruction. The output modifier cannot be
disabled for a saturated MOV (MOV with clamping enabled).
3.6.3
ALU Transcendental Floating Point
In X1K FP, transcendental operations are EX2, LN2, RCP, RSQ, SIN, and COS (mathematically speaking, one of
these functions does not belong). Transcendentals do not maintain extra internal precision; as a result, if the result of
the transcendental operation exceeds the IEEE finite range, the ALU will generate infinity even if the output modifier
would bring the result back into range. Similarly if the result is denormal, the ALU will generate a pure zero
(preserving sign) even if the output modifier would bring the result back into the normal range.
Special values are computed as shown in the following table:
Note:
* For RSQ, recall that the square root occurs first. IEEE specifies sqrt(-0.0) -> -0.0; the X1K FP deviates
from this.
x + NaN
NaN
x is any value.
Inf + -Inf
NaN
Inf + Inf
Inf
Inf + -1.0
Inf
0.0 + -0.0
0.0
-0.0 + -0.0
-0.0
OPERATION
RESULT
NOTES
INPUT
EX2
LN2
RCP
RSQ
SIN
COS
+0.0
+1.0
-Inf
+Inf
+Inf
+0.0
+1.0
-0.0
+1.0
-Inf
-Inf +Inf
*
-0.0
+1.0
+Inf
+Inf
+Inf
+0.0
+0.0
NaN
NaN
-Inf
+0.0
NaN
-0.0
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
NaN
Summary of Contents for ATI CTM
Page 1: ...ATI CTM Guide Technical Reference Manual Version 1 01...
Page 6: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 2 Related Documents...
Page 48: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 44 Errata...
Page 54: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 50 Executable Files...