;e^x = 2^(x * log2(e)) fld1 ;we is calculating e^1 fldl2e ;log2(e) fsub st1 ;frac(x * log2(e)) f2xm1 ;2^(fract(x * log2(e))) - 1 fld1 ;push 1.0 faddp st1,st0 ;add st1 and st0 and pop fscale ;scale st0 by st1 fstp st1 ;copy st0 to st1 and pop