FYL2X—Compute y ∗ log2xDescriptionComputes (ST(1) ∗ log2 (ST(0))), stores the result in register ST(1), and pops the FPU register stack. The source operand in ST(0) must be a non-zero positive number.The following table shows the results obtained when taking the log of various classes of numbers, assuming that neither overflow nor underflow occurs.If the divide-by-zero exception is masked and register ST(0) contains ±0, the instruction returns ∞ with a sign that is the opposite of the sign of the source operand in register ST(1).The FYL2X instruction is designed with a built-in multiplication to optimize the calculation of logarithms with an arbitrary positive base (b):logbx := (log2b)–1∗ log2xThis instruction’s operation is the same in non-64-bit modes and 64-bit mode.OperationST(1) := ST(1) ∗ log2ST(0);PopRegisterStack;FPU Flags AffectedC1Set to 0 if stack underflow occurred.Set if result was rounded up; cleared otherwise.C0, C2, C3 Undefined.OpcodeInstruction64-Bit ModeCompat/Leg ModeDescriptionD9 F1FYL2XValidValidReplace ST(1) with (ST(1) ∗ log2ST(0)) and pop the register stack.Table 3-48. FYL2X ResultsST(0)− ∞− F±0+0<+F<+1+ 1+ F >+ 1+ ∞NaN− ∞**+ ∞+ ∞*−∞− ∞NaNST(1)−F****+ F− 0− F− ∞NaN−0***+ 0− 0− 0*NaN+ 0***− 0+ 0+ 0*NaN+ F****− F+ 0+ F+ ∞NaN+ ∞**− ∞− ∞*+ ∞+ ∞NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNOTES:FMeans finite floating-point value.*Indicates floating-point invalid-operation (#IA) exception.**Indicates floating-point zero-divide (#Z) exception.
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.