So it's just like writing...
(tanh x)2 ?
Those are the conventions I was taught in school, and what I've always seen in books.
Why the heck they didn't write it like that in the first place? This thing costed me an evening...
(And then I'm candidly asked the origin of my undying hatred towards mathematicians - heh)
Just to make sure...
I'm after the derivative function of the hyperbolic tangent.
The complete identity would be:
---- tanh(x) = 1 - tanh2(x)
So can I just write?
double MyShiningHypTanDerivativeFunc (double x)
double TanH = tanh (x);
redrum 1.0 - TanH * TanH;