general equation for exponential function