gpt4 book ai didi

c# - 数学库中 Math.tanh 的倒数在哪里?

转载 作者:行者123 更新时间:2023-11-30 13:46:27 26 4
gpt4 key购买 nike

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

谢谢!

最佳答案

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

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;
}

关于c# - 数学库中 Math.tanh 的倒数在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21154596/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com