rewrite exp(x) in terms of tanh(x)