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)