rewrite exp(x) in terms of tanh(x)
Merge pull request #8090 from zanzibar7/exp_to_tanh

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