Download Intel Architecture Software Developer`s Manual, Volume 1
Transcript
FLOATING-POINT UNIT These values encoded in standard IEEE double-real format are as follows: highπ = 400921FB 54400000 lowπ = 3DE0B461 1A600000 (Note that in the IEEE double-real format, the exponents are biased (by 1023) and the fractions are normalized.) Similar versions of π can also be written in extended-real format. When using this two-part π value in an algorithm, parallel computations should be performed on each part, with the results kept separate. When all the computations are complete, the two results can be added together to form the final result. The complications of maintaining a consistent value of π for argument reduction can be avoided, either by applying the trigonometric functions only to arguments within the range of the automatic reduction mechanism, or by performing all argument reductions (down to a magnitude less than π/4) explicitly in software. 7.5.9. Logarithmic, Exponential, and Scale The following instructions provide two different logarithmic functions, an exponential function, and a scale function. FYL2X FYL2XP1 F2XM1 FSCALE Compute log: Compute log epsilon: Compute exponential: Scale (y ∗ log2x) (y ∗ log2(x + 1)) (2x – 1) The FYL2X and FYL2XP1 instructions perform two different base 2 logarithmic operations. The FYL2X instruction computes the log of (y ∗ log2(x)). This operation permits the calculation of the log of any base using the following equation: logb x = (1/log2 b) ∗ log2 x The FYL2XP1 instruction computes the log epsilon of (y ∗ log2(x + 1)). This operation provides optimum accuracy for values of x that may be very close to 0. The F2XM1 instruction computes the exponential (2x − 1). This instruction only operates on source values in the range −1.0 to +1.0. The FSCALE instruction multiplies the source operand by a power of 2. 7.5.10. Transcendental Instruction Accuracy The algorithms that the Pentium® and Pentium® Pro processors use for the transcendental instructions (FSIN, FCOS, FSINCOS, FPTAN, FPATAN, F2XM1, FYL2X, and FYL2XP1) allow a higher level of accuracy than was possible in earlier IA math coprocessors and FPUs. The accuracy of these instructions is measured in terms of units in the last place (ulp). For a 7-40