y = Math.Tanh(x)
is the hyperbolic tangent of x
. But I need f(y) = x
. For the regular tangent there's Arctan, but where's Arctanh?
thanks!
I don't think the C# libraries include the arc hyperbolic trig functions, but they're easy to compute:
atanh(x) = (log(1+x) - log(1-x))/2
In C#:
public static double ATanh(double x)
{
return (Math.Log(1 + x) - Math.Log(1 - x))/2;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With