x ^ y

From: Zdenek Sojka (XzsojkaX_at_seXznam.cz)
Date: 09/27/04


Date: Mon, 27 Sep 2004 18:01:09 +0200

Hello there,

I've the following problem, and I'm sure, you have solved it before so you
cloud help me with that one.

Its simple - I just want to compute x ^ y.

I tried the following code

st0 = y
st1 = x

fyl2x ;st0=log2(x) / 2

fxtract ;st0=sig,st1=exp
fld1
fadd st2,st0
faddp st1 ;st0=sig-1 (<1), st1=exp+1
f2xm1 ;st0=2^sig - 1, st1=exp
fld1
faddp st1 ;st0=2^sig, st1=exp
fscale ;st0=2^sig*2^exp=2^(sig+exp), st1=exp

fstp st1

but it doesnt work. (Im so unhappy that f2xm1 supports just -1<st0<1)

Could anyone help me?

Thanks
Zdenek Sojka