ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] VBA¸Ìªº¤T¨¤¨ç¼Æ

[µo°Ý] VBA¸Ìªº¤T¨¤¨ç¼Æ

¤j¤j¦n¡A½Ð°Ý¡G
§Ú¦b¨ç¼Æ¸Ìªí¥Ü¬°¡G=COS(12«×*PI()/180)
½Ð°Ý¦bVBA¸Ì­n¦p¦óªí¥Ü©O¡H
EX¡G
textbox1¡G50
textbox2¡Gval(textbox1) * COS(12«×*PI()/180)

ÁÂÁ¡I

ºô¸ô¤W¬Ý¨ìªº¡A¤£¾å±o¦X¥Î§_¡ã

¾É¥Xªº¼Æ¾Ç¨ç¼Æ
   

¥H¤U¬°«D°ò¥»¼Æ¾Ç¨ç¼Æªº¦Cªí¡A¬Ò¥i¥Ñ°ò¥»¼Æ¾Ç¨ç¼Æ¾É¥X¡G

¨ç¼Æ ¥Ñ°ò¥»¨ç¼Æ¾É¥X¤§¤½¦¡
Secant¡]¥¿³Î¡^ Sec(X) = 1 / Cos(X)
Cosecant¡]§E³Î¡^ Cosec(X) = 1 / Sin(X)
Cotangent¡]¾l¤Á¡^ Cotan(X) = 1 / Tan(X)
Inverse Sine
¡]¤Ï¥¿©¶¡^
Arcsin(X) = Atn(X / Sqr(-X * X + 1))
Inverse Cosine
¡]¤Ï§E©¶¡^
Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
Inverse Secant
¡]¤Ï¥¿³Î¡^
Arcsec(X) = Atn(X / Sqr(X * X - 1)) + Sgn((X) - 1) * (2 * Atn(1))
Inverse Cosecant
¡]¤Ï§E³Î¡^
Arccosec(X) = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
Inverse Cotangent
¡]¤Ï¾l¤Á¡^
Arccotan(X) = Atn(X) + 2 * Atn(1)
Hyperbolic Sine
¡]Âù¦±¥¿©¶¡^
HSin(X) = (Exp(X) - Exp(-X)) / 2  
Hyperbolic Cosine
¡]Âù¦±§E©¶¡^
HCos(X) = (Exp(X) + Exp(-X)) / 2
Hyperbolic Tangent
¡]Âù¦±¥¿¤Á¡^
HTan(X) = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
Hyperbolic Secant
¡]Âù¦±¥¿³Î¡^
HSec(X) = 2 / (Exp(X) + Exp(-X))
Hyperbolic Cosecant¡]Âù¦±§E³Î¡^ HCosec(X) = 2 / (Exp(X) - Exp(-X))
Hyperbolic Cotangent¡]Âù¦±¾l¤Á¡^ HCotan(X) = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
Inverse Hyperbolic Sine¡]¤ÏÂù¦±¥¿©¶¡^ HArcsin(X) = Log(X + Sqr(X * X + 1))
Inverse Hyperbolic Cosine¡]¤ÏÂù¦±§E©¶¡^ HArccos(X) = Log(X + Sqr(X * X - 1))
Inverse Hyperbolic Tangent¡]¤ÏÂù¦±¥¿¤Á¡^ HArctan(X) = Log((1 + X) / (1 - X)) / 2
Inverse Hyperbolic Secant¡]¤ÏÂù¦±¥¿³Î¡^ HArcsec(X) = Log((Sqr(-X * X + 1) + 1) / X)
Inverse Hyperbolic Cosecant HArccosec(X) = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
Inverse Hyperbolic Cotangent
¡]¤ÏÂù¦±¾l¤Á¡^
HArccotan(X) = Log((X + 1) / (X - 1)) / 2
¥H N ¬°©³ªº¹ï¼Æ LogN(X) = Log(X) / Log(N)


'¨ãÅé©w¸q¦p¤U¡G

Public Function ArcSin(ByVal X As Double) As Double  '¤Ï¥¿©¶
    ArcSin = Atn(X / Sqr(-X * X + 1))
End Function

Public Function ArcCos(ByVal X As Double) As Double  '¤Ï§E©¶
    ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
End Function

Public Function ArcCoTan(ByVal X As Double) As Double  '¤Ï¥¿³Î
    ArcCoTan = Atn(X) + 2 * Atn(1)
End Function

Public Function Sec(ByVal X As Double) As Double     '¥¿³Î
     Sec = 1 / Cos(X)
End Function

Public Function CoSec(ByVal X As Double) As Double     '§E³Î
     CoSec = 1 / Sin(X)
End Function

Public Function CoTan(ByVal X As Double) As Double     '¾l¤Á
     CoTan = 1 / Tan(X)
End Function

Public Function ArcCoSec(ByVal X As Double) As Double     '¤Ï§E³Î
     ArcCoSec = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
End Function

Public Function ArcCoTan(ByVal X As Double) As Double     '¤Ï¾l¤Á
     ArcCoTan = Atn(X) + 2 * Atn(1)
End Function

Public Function HSin(ByVal X As Double) As Double     'Âù¦±¥¿©¶
     HSin = (Exp(X) - Exp(-X)) / 2
End Function

Public Function HCos(ByVal X As Double) As Double     'Âù¦±§E©¶
     HCos = (Exp(X) + Exp(-X)) / 2
End Function

Public Function HTan(ByVal X As Double) As Double     'Âù¦±¥¿¤Á
     HTan = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
End Function

Public Function HSec(ByVal X As Double) As Double     'Âù¦±¥¿³Î
     HSec = 2 / (Exp(X) + Exp(-X))
End Function

Public Function HCosec(ByVal X As Double) As Double     'Âù¦±§E³Î
     HCosec = 2 / (Exp(X) - Exp(-X))
End Function

Public Function HCotan(ByVal X As Double) As Double     'Âù¦±¾l¤Á
     HCotan = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
End Function

Public Function HArcsin(ByVal X As Double) As Double     '¤ÏÂù¦±¥¿©¶
     HArcsin = Log(X + Sqr(X * X + 1))
End Function

Public Function HArccos(ByVal X As Double) As Double     '¤ÏÂù¦±§E©¶
     HArccos = Log(X + Sqr(X * X - 1))
End Function

Public Function HArcsec(ByVal X As Double) As Double     '¤ÏÂù¦±¥¿³Î
     HArcsec = Log((Sqr(-X * X + 1) + 1) / X)
End Function

Public Function HArccosec(ByVal X As Double) As Double     '¤ÏÂù¦±§E³Î
     HArccosec = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
End Function

Public Function HArccotan(ByVal X As Double) As Double     '¤ÏÂù¦±¾l¤Á
     HArccotan = Log((X + 1) / (X - 1)) / 2
End Function

Public Function LogN(ByVal X As Double) As Double     '¥H N ¬°©³ªº¹ï¼Æ
     LogN = Log(X) / Log(N)
End Function

TOP

¦^´_ 1# lifedidi
= Cos(12 * WorksheetFunction.Pi() / 180)

textbox2.value = textbox1.value*Cos(12 * WorksheetFunction.Pi() / 180)

TOP

·PÁ¤j¤j¡I§Ú¤§«e¥Î3.14ºâ¥X¨Óªº­È¦³»~®t¡A²{¦bok¤F¡IÁÂÁ¡I

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD