VBA中的数学公式

Table 3-5. Visual Basic math functions
General

Abs
Exp
Fix
Int
Log

Rnd
Sgn
Sqr
  
Trigonometric

Atn
Cos
Sin
Tan

Financial

DDB
FV
IPmt
IRR
MIRR

NPer
NPV
Pmt
PPmt
PV

Rate
SLN
SYD
  




Table 3-6. Derived math functions
Function
Formula

Secant (Sec)
1 / Cos(x)

Cosecant (Cosec)
1 / Sin(x)

Cotangent (Cotan)
1 / Tan(x)

Inverse Sine (Arcsin)
Atn(x / Sqr(-x * x + 1))

Inverse Cosine (Arccos)
Atn(-x / Sqr(-x * x + 1)) + 2 * Atn(1)

Inverse Secant (Arcsec)
Atn(x / Sqr(x * x - 1)) + Sgn((x) - 1) * (2 * Atn(1))

Inverse Cosecant (Arccosec)
Atn(Sgn(x) / Sqr(x * x 1))

Inverse Cotangent (Arccotan)
2 * Atn(1) - Atn(x)

Hyperbolic Sine (HSin)
(Exp(x) - Exp(-x)) / 2

Hyperbolic Cosine (HCos)
(Exp(x) + Exp(-x)) / 2

Hyperbolic Tangent (HTan)
(Exp(x) - Exp(-x)) / (Exp(x) + Exp(-x))

Hyperbolic Secant (HSec)
2 / (Exp(x) + Exp(-x))

Hyperbolic Cosecant (HCosec)
2 / (Exp(x) - Exp(-x))

Hyperbolic Cotangent (HCotan)
(Exp(x) + Exp(-x)) / (Exp(x) - Exp(-x))

Inverse Hyperbolic Sine (HArcsin)
Log(x + Sqr(x * x + 1))

Inverse Hyperbolic Cosine (HArccos)
Log(x + Sqr(x * x - 1))

Inverse Hyperbolic Tangent (HArctan)
Log((1 + x) / (1 x)) / 2

Inverse Hyperbolic Secant (HArcsec)
Log((Sqr(-x * x + 1) + 1) / x)

Inverse Hyperbolic Cosecant (HArccosec)
Log((Sgn(x) * Sqr(x * x + 1) + 1) / x)

Inverse Hyperbolic Cotangent (HArccotan)
Log(x + Sqr(x * x - 1))

Logarithm to base N (LogN)
Log(x) / Log(n)

posted on   风中狂笑  阅读(249)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示