x86 Assembly Language Reference Manual

Miscellaneous Arithmetic Operations

Square Root (fsqrt)

fsqrt    	
Example

Replace stack element 0 with the square root of its value.

fsqrt

Scale (fscale)

fscale

Example

Add the integer value in stack element 1 to the exponent of stack element 0 (multiplication and division by powers of 2).

fscale

Partial Remainder (fprem)

fprem	

Example

Divide stack element 0 by stack element 1 and return the (partial) remainder to stack element 0.

fprem

Round to Integer (frndint)

frndint

Example

Round the value in stack element 0 to an integer according to the FPU control word RC field.

frndint

Extract Exponent and Significand (fxtract)

fxtract
Example

Separate stack element 0 into its exponent and significand and return the exponent to stack element 0, then push the significand onto the FPU stack.

fxtract

Absolute Value (fabs)

fabs
Example

Replace stack element 0 with its absolute value.

fabs

Change Sign (fchs)

fchs
Example

Replace the sign of stack element 0 with the opposite sign.

fchs