几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   数据库ObjectDBX (http://www.dimcax.com/hust/forumdisplay.php?f=177)
-   -   【转帖】在vba里由基本三角函数导出的三角函数 (http://www.dimcax.com/hust/showthread.php?t=13439)

yang686526 2009-04-28 12:25 PM

【转帖】在vba里由基本三角函数导出的三角函数
 
在vba里由基本三角函数导出的三角函数
www.dimcax.com
在vba里由基本三角函数导出的三角函数
导出的数学函数

以下为非基本数学函数的列表,皆可由基本数学函数导出:
函数 由基本函数导出之公式
secant(正割) sec(x) = 1 / cos(x)
cosecant(余割) cosec(x) = 1 / sin(x)
cotangent(余切) cotan(x) = 1 / tan(x)
inverse sine
(反正弦)
arcsin(x) = atn(x / sqr(-x * x + 1))
inverse cosine
(反余弦)
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
(反余割)
arccosec(x) = atn(x / sqr(x * x - 1)) + (sgn(x) - 1) * (2 * atn(1))
inverse cotangent
(反余切)
arccotan(x) = atn(x) + 2 * atn(1)
hyperbolic sine
(双曲正弦)
hsin(x) = (exp(x) - exp(-x)) / 2
hyperbolic cosine
(双曲余弦)
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(双曲余割) hcosec(x) = 2 / (exp(x) - exp(-x))
hyperbolic cotangent(双曲余切) hcotan(x) = (exp(x) + exp(-x)) / (exp(x) - exp(-x))
inverse hyperbolic sine(反双曲正弦) harcsin(x) = log(x + sqr(x * x + 1))
inverse hyperbolic cosine(反双曲余弦) 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
(反双曲余切)
harccotan(x) = log((x + 1) / (x - 1)) / 2
以 n 为底的对数 logn(x) = log(x) / log(n)

'具体定义如下:
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 '反余弦
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 '余割
cosec = 1 / sin(x)
end function
public function cotan(byval x as double) as double '余切
cotan = 1 / tan(x)
end function
public function arccosec(byval x as double) as double '反余割
arccosec = atn(x / sqr(x * x - 1)) + (sgn(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 hsin(byval x as double) as double '双曲正弦
hsin = (exp(x) - exp(-x)) / 2
end function
public function hcos(byval x as double) as double '双曲余弦
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 '双曲余割
hcosec = 2 / (exp(x) - exp(-x))
end function
public function hcotan(byval x as double) as double '双曲余切
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 '反双曲余弦
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 '反双曲余割
harccosec = log((sgn(x) * sqr(x * x + 1) + 1) / x)
end function
public function harccotan(byval x as double) as double '反双曲余切
harccotan = log((x + 1) / (x - 1)) / 2
end function
public function logn(byval x as double) as double '以 n 为底的对数
logn = log(x) / log(n)
end function

我现在用不上

支持! 有用
原创lisp操作cad内置对话框
原创lisp直接调用windows api
原创lisp开发小助手(代码自动生成器)
原创vba语句->lisp语句解释器
原创lisp调用dos命令带返回值
原创lisp音乐播放器
原创lisp直接使用vba对话框

支持! 有用


所有的时间均为北京时间。 现在的时间是 01:52 PM.