2个回答
展开全部
Atn(x) /Sqr(-x ^ 2 + 1))
下个msdn来看看
下个msdn来看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把下面代码保存成一个模块,需要的时候就能直接调用了。集合了全部三角函数。很实用。
==================
Function Sec(X) As Double '正割
Sec = 1 / Cos(Angle)
End Function
Function Csc(X) As Double '余割
Csc = 1 / Sin(Angle)
End Function
Function Cot(X) As Double '余切
Cot = 1 / Tan(Angle)
End Function
Function ArcSin(X) As Double '反正弦
ArcSin = Atn(X / Sqr(-X * X + 1))
End Function
Function ArcCos(X) As Double '反余弦
ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
End Function
Function ArcSec(X) As Double '反正割
ArcSec = Atn(X / Sqr(X * X - 1)) + Sgn((X) - 1) * (2 * Atn(1))
End Function
Function ArcCsc(X) As Double '反余割
ArcCsc = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
End Function
Function ArcCot(X) As Double '反余切
ArcCot = Atn(X) + 2 * Atn(1)
End Function
Function HSin(X) As Double '双曲正弦
HSin = (Exp(X) - Exp(-X)) / 2
End Function
Function HCos(X) As Double '双曲余弦
HCos = (Exp(X) + Exp(-X)) / 2
End Function
Function HTan(X) As Double '双曲正切
HTan = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
End Function
Function HSec(X) As Double '双曲正割
HSec = 2 / (Exp(X) + Exp(-X))
End Function
Function HCsc(X) As Double '双曲余割
HCsc = 2 / (Exp(X) - Exp(-X))
End Function
Function HCot(X) As Double '双曲余切
HCot = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
End Function
Function HArcsin(X) As Double '反双曲正弦
HArcsin = Log(X + Sqr(X * X + 1))
End Function
Function HArccos(X) As Double '反双曲余弦
HArccos = Log(X + Sqr(X * X - 1))
End Function
Function HArctan(X) As Double '反双曲正切
HArctan = Log((1 + X) / (1 - X)) / 2
End Function
Function HArcsec(X) As Double '反双曲正割
HArcsec = Log((Sqr(-X * X + 1) + 1) / X)
End Function
Function HArccsc(X) As Double '反双曲余割
HArccsc = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
End Function
Function HArccot(X) As Double '反双曲余切
HArccot = Log((X + 1) / (X - 1)) / 2
End Function
Function LogN(N, X) '以 N 为底的对数
LogN = Log(X) / Log(N)
End Function
==================
Function Sec(X) As Double '正割
Sec = 1 / Cos(Angle)
End Function
Function Csc(X) As Double '余割
Csc = 1 / Sin(Angle)
End Function
Function Cot(X) As Double '余切
Cot = 1 / Tan(Angle)
End Function
Function ArcSin(X) As Double '反正弦
ArcSin = Atn(X / Sqr(-X * X + 1))
End Function
Function ArcCos(X) As Double '反余弦
ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
End Function
Function ArcSec(X) As Double '反正割
ArcSec = Atn(X / Sqr(X * X - 1)) + Sgn((X) - 1) * (2 * Atn(1))
End Function
Function ArcCsc(X) As Double '反余割
ArcCsc = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
End Function
Function ArcCot(X) As Double '反余切
ArcCot = Atn(X) + 2 * Atn(1)
End Function
Function HSin(X) As Double '双曲正弦
HSin = (Exp(X) - Exp(-X)) / 2
End Function
Function HCos(X) As Double '双曲余弦
HCos = (Exp(X) + Exp(-X)) / 2
End Function
Function HTan(X) As Double '双曲正切
HTan = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
End Function
Function HSec(X) As Double '双曲正割
HSec = 2 / (Exp(X) + Exp(-X))
End Function
Function HCsc(X) As Double '双曲余割
HCsc = 2 / (Exp(X) - Exp(-X))
End Function
Function HCot(X) As Double '双曲余切
HCot = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
End Function
Function HArcsin(X) As Double '反双曲正弦
HArcsin = Log(X + Sqr(X * X + 1))
End Function
Function HArccos(X) As Double '反双曲余弦
HArccos = Log(X + Sqr(X * X - 1))
End Function
Function HArctan(X) As Double '反双曲正切
HArctan = Log((1 + X) / (1 - X)) / 2
End Function
Function HArcsec(X) As Double '反双曲正割
HArcsec = Log((Sqr(-X * X + 1) + 1) / X)
End Function
Function HArccsc(X) As Double '反双曲余割
HArccsc = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
End Function
Function HArccot(X) As Double '反双曲余切
HArccot = Log((X + 1) / (X - 1)) / 2
End Function
Function LogN(N, X) '以 N 为底的对数
LogN = Log(X) / Log(N)
End Function
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询