ia-32_volume1_basic-arch

In chapter 3 instruction set reference a m of the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ponent in decimal) represent the 33 most-significant and the 33 least-significant bits of the fraction: high (unnormalized) = 0.C90FDAA20 * 2+2 low (unnormalized) = 0.42D184698 * 2- 31 These values encoded in the IEEE double-precision floating-point format are as follows: high = 400921FB 54400000 low = 3DE0B461 1A600000 (Note that in the IEEE double-precision floating-point format, the exponents are biased (by 1023) and the fractions are normalized.) 8-30 Vol. 1 PROGRAMMING WITH THE X87 FPU Similar versions of can also be written in double extended-precision floating-point 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. 8.3.9 Logarithmic, Exponential, and Scale The following instructions provide two different logarithmic functions, an exponential function and a scale function: FYL2X FYL2XP1 F2XM1 FSCALE Logarithm Logarithm epsilon Exponential Scale The FYL2X and FYL2XP1 instructions perform two different base 2 logarithmic operations. The FYL2X instruction computes (y log2x). 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 (y log2(x + 1)). This operation provides optimum accuracy for values of x that are close to 0. The F2XM1 instruction computes (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. 8.3.10 Transcendental Instruction Accuracy New transcendental instruction algorithms were incorporated into the IA-32 architecture beginning with the Pentium processors. These new algorithms (used in transcendental instructions FSIN, FCOS, FSINCOS, FPTAN, FPATAN, F2XM1, FYL2X, and FYL2XP1) allow a higher level of accuracy than was possible in earlier IA-32 processors and x87 math coprocessors. The accuracy of these instructions is measured in terms of units in the last place (ulp). For a given argument x, let f(x) and F(x) be Vol. 1 8-31 PROGRAMMING WITH THE X87 FPU the correct and computed (approximate) function values, respectively. The error in ulps is defined to be: error = f ( x ) F ( x ) -------------------------k 63 2 where k is an integer such that: 12 k f ( x ) < 2. With the Pentium processor and later IA-32 processors, the worst case error on transcendental functions is less than 1 ulp when rounding to the nearest (even) and less than 1.5 ulps when rounding in other modes. The functions are guaranteed to be monotonic, with respect to...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online