I am looking for a way to implement a fast logistic function. The classic definition of logistic function is:
y(x) = 1 / (1 + (1/e^x))
y(x) = (e^x) / (e^x + 1)
y(x) = E^x / (E^x + 1)
e^(i*x) = cos(x) + i*sin(x)
Powers do not easily convert to bit shifts, because
E^x = 2^log2(E^x) = 2^(x*log2(E))
and this will give you a fractional number of bits to shift. You could calculate x*log2(E) and then decompose the power into a sum of separate bit shifts, but this is unlikely be as fast as a lookup table followed by a couple of iterations of Newton's method. Then again, this depends on how expensive your fixed-point arithmetic operations are.