Calculate y × log_{2}(x)
Hex  Mnemonic  Encoding  Long Mode  Legacy Mode  Description 

D9 F1  FYL2X  None  Valid  Valid  Replace ST(1) with (ST(1) log2ST(0)) and pop the register stack. 
Computes (ST(1) * log
The following table shows the results obtained when taking the log of various classes of numbers, assuming that neither overflow nor underflow occurs.
DEST  

SRC 

If the dividebyzero 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 builtin multiplication to optimize the calculation of logarithms with an arbitrary positive base (b):
log_{b}x = (log_{2}b)^{1} * log_{2}x
This instruction's operation is the same in non64bit modes and 64bit mode.
ST(1) = ST(1) * log2ST(0); PopRegisterStack;
C1: Set to 0 if stack underflow occurred. Set if result was rounded up; cleared otherwise. C0, C2, C3 are undefined.
Exception  Description 

#P  Value cannot be represented exactly in destination format. 
#O  Result is too large for destination format. 
#U  Result is too small for destination format. 
#D  Source operand is a denormal value. 
#Z  Source operand in register ST(0) is 0. 
#IA  Either operand is an SNaN or unsupported format. Source operand in register ST(0) is a negative finite value (not 0). 
#IS  Stack underflow occurred. 
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Exception  Description 

#UD  If the LOCK prefix is used. 
#MF  If there is a pending x87 FPU exception. 
#NM  CR0.EM[bit 2] or CR0.TS[bit 3] = 1. 