VB程序中的反三角函数是什么 5

 我来答
夏虫不可语冰dP
推荐于2016-01-17 · TA获得超过490个赞
知道小有建树答主
回答量:227
采纳率:0%
帮助的人:0
展开全部
ArcTan:
VB自带:Atn

ArcSin:
Function ArcSin(X As Doule) As Double
Dim Temp As Double
If X = 0 Then
Temp=0
Else
Temp = Atn(X/Sqr(1-X*X))
End If
ArcSin=Temp
End Function

ArcCos:
Function ArcCos(X As Doule) As Double
Dim Temp As Double
If X = 0 Then
Temp=pi/2
Else
Temp = Atn(Sqr(1-X*X)/X)
End If
ArcCos=Temp
End Function

'Secant
Public Function Sec(ByVal Number As Double) As Double
Sec = 1 / Cos(Number)
End Function

'Cosecant
Public Function Csc(ByVal Number As Double) As Double
Csc = 1 / Sin(Number)
End Function

'Cotangent
Public Function Ctn(ByVal Number As Double) As Double
Ctn = 1 / Tan(Number)
End Function

'Inverse Sine
Public Function ASin(ByVal Number As Double) As Double
ASin = Atn(Number / Sqr(-Number * Number + 1))
End Function

'Inverse Cosine
Public Function ACos(ByVal Number As Double) As Double
ACos = Atn(-Number / Sqr(-Number * Number + 1)) + 2 * Atn(1)
End Function

'Inverse Secant
Public Function ASec(ByVal Number As Double) As Double
ASec = Atn(Number / Sqr(Number * Number - 1)) + Sgn((Number) - 1) * (2 *
Atn(1))
End Function

'Inverse Cosecant
Public Function ACsc(ByVal Number As Double) As Double
ACsc = Atn(Number / Sqr(Number * Number - 1)) + (Sgn(Number) - 1) * (2 *
Atn(1))
End Function

'Inverse Cotangent
Public Function ACtn(ByVal Number As Double) As Double
ACtn = Atn(Number) + 2 * Atn(1)
End Function

'Hyperbolic Sine
Public Function SinH(ByVal Number As Double) As Double
SinH = (Exp(Number) - Exp(-Number)) / 2
End Function

'Hyperbolic Cosine
Public Function CosH(ByVal Number As Double) As Double
CosH = (Exp(Number) + Exp(-Number)) / 2
End Function

'Hyperbolic Tangent
Public Function TanH(ByVal Number As Double) As Double
TanH = (Exp(Number) - Exp(-Number)) / (Exp(Number) + Exp(-Number))
End Function

'Hyperbolic Secant
Public Function SecH(ByVal Number As Double) As Double
SecH = 2 / (Exp(Number) + Exp(-Number))
End Function

'Hyperbolic Cosecant
Public Function CscH(ByVal Number As Double) As Double
CscH = 2 / (Exp(Number) - Exp(-Number))
End Function

'Hyperbolic Cotangent
Public Function CtnH(ByVal Number As Double) As Double
CtnH = (Exp(Number) + Exp(-Number)) / (Exp(Number) - Exp(-Number))
End Function

'Inverse Hyperbolic Sine
Public Function ASinH(ByVal Number As Double) As Double
ASinH = Log(Number + Sqr(Number * Number + 1))
End Function

'Inverse Hyperbolic Cosine
Public Function ACosH(ByVal Number As Double) As Double
ACosH = Log(Number + Sqr(Number * Number - 1))
End Function

'Inverse Hyperbolic Tangent
Public Function ATanH(ByVal Number As Double) As Double
ATanH = Log((1 + Number) / (1 - Number)) / 2
End Function

'Inverse Hyperbolic Secant
Public Function ASecH(ByVal Number As Double) As Double
ASecH = Log((Sqr(-Number * Number + 1) + 1) / Number)
End Function

'Inverse Hyperbolic Cosecant
Public Function ACscH(ByVal Number As Double) As Double
ACscH = Log((Sgn(Number) * Sqr(Number * Number + 1) + 1) / Number)
End Function

'Inverse Hyperbolic Cotangent
Public Function ACtnH(ByVal Number As Double) As Double
ACtnH = Log((Number + 1) / (Number - 1)) / 2
End Function

'Logarithm to base N
Public Function LogN(ByVal Base As Double, ByVal Number As Double)
LogN = Log(Number) / Log(Base)
End Function

'Convert degrees to radians
Public Function DegToRad(ByVal Number As Double) As Double
DegToRad = Number * 1.74532925199433E-02 'pi/180
End Function

'Convert radians to degrees
Public Function RadToDeg(ByVal Number As Double) As Double
RadToDeg = Number * 57.2957795130824 ' 180/pi
End Function
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式