数学库中Math.tanh的逆数在哪里? [英] Where's the inverse of Math.tanh in the math libraries?

查看:42
本文介绍了数学库中Math.tanh的逆数在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

y = Math.Tanh(x) x 的双曲正切.但是我需要 f(y)= x .对于正切线,有Arctan,但在哪里Arctanh?

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?

谢谢!

推荐答案

我不认为C#库包含弧双曲三角函数,但是它们很容易计算:

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

在C#中:

public static double ATanh(double x)
{
    return (Math.Log(1 + x) - Math.Log(1 - x))/2;
}

这篇关于数学库中Math.tanh的逆数在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆