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

如题所述

第1个回答  推荐于2016-01-17
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本回答被网友采纳

VB程序中的反三角函数是什么
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 = ...

VB中反三角函数怎么表示
反正弦 : Arcsin(X) = Atn(X \/ Sqr(-X * X + 1))反余弦: Arccos(X) = Atn(-X \/ Sqr(-X * X + 1)) + 2 * Atn(1)

VB里怎么用反三角函数请详细点
Atn()是VB反正切函数,VB不提供其他反三角函数,不过可以用下列公式导出:ArcTan(X) = Atn(X)Arcsin(X) = Atn(X \/ Sqr(-X * X + 1))Arccos(X) = Atn(-X \/ Sqr(-X * X + 1)) + 2 * Atn(1)

vb怎样计算反三角函数???
反余切:y = Atn(x) + 2 * Atn(1)

vb中arcsin() 与 arccos() 分别是什么格式
没有,只有一个Atn()是VB反正切函数,VB不提供其他反三角函数,不过可以用下列公式导出:反正弦 Arcsin(X) = Atn(X \/ Sqr(-X * X + 1))反余弦 Arccos(X) = Atn(-X \/ Sqr(-X * X + 1)) + 2 * Atn(1)反正割 Arcsec(X) = Atn(X \/ Sqr(X * X - 1)) + Sgn((X) - ...

VB编程的问题!会VB语言的请帮帮我!
在VB编程中,处理三角函数问题时,通常使用弧度作为计算单位。例如,计算角度值时,需先将度数转换为弧度。若要计算文本1所示的表达式,首先,需要理解其中的符号含义。Atn表示反正切函数,Cos表示余弦函数。在VB中,需要将角度转换为弧度进行计算。对于文本1中的第一部分:Atn(-0.5 \/ Sqr(-0.5 * 0...

VB中计算反三角函数
设余切值为i 反余切则为atn(1\/i)VB中只反正切的反三角函数,其它反三角函数都需要转换到此函数来计算。当然也可以自己编,比较麻烦。

关于VB中反三角函数的定义
改成 Private Function Arccos(X As Double) As Double 用整数怎么算三角函数啊,要用double的

在vb中ARCCOS函数怎么定义和调用
arccosx可以表示为Atn(Sqr(1 - x ^ 2) \/ x)下面是一个例子:Const pi = 3.1415926 Private Sub Command1_Click()Dim i As Single, j As Single i = 0.5 j = Arccos(i)Print i, j, j \/ pi * 180 i = -0.5 j = Arccos(i)Print i, j, j \/ pi * 180 i = 0 j = ...

在vb中怎么把三角函数比值转化为度数啊(知道正切比值,求度数)
反正切函数:Atn(X),返回的值单位为弧度,自己转换一下。

相似回答