Taking an integer to a floating point power
nrk752
Posts: 8
I am trying to calculate the result of this formula in a Javelin program:
y = 153.52 * x ^ -0.1775
where x is an integer.· In Float32Math it is possible to take a floating point number to an integer power, and to take e to a floating point power, but how would I go about taking an integer to a floating point power?· My only other solution at this point is to use a set of peicewise linear formulas that approximate the curve within limited regions. ·
y = 153.52 * x ^ -0.1775
where x is an integer.· In Float32Math it is possible to take a floating point number to an integer power, and to take e to a floating point power, but how would I go about taking an integer to a floating point power?· My only other solution at this point is to use a set of peicewise linear formulas that approximate the curve within limited regions. ·
Comments
x = e ^ z
z = logE(x)
y = 153.52 * (e ^ (-0.1775*z))
regards peter
log10(x) = z*log10(e)
z = log10(x)/log10(e)
regards peter