PHP tanh() 函数
定义和用法
tanh()
函数返回双曲正切。
实例
在本例中,我们将返回不同的数的双曲正切:
<?php
echo(tanh(M_PI_4));
echo(tanh(0.50));
echo(tanh(-0.50));
echo(tanh(5));
echo(tanh(10));
echo(tanh(-5));
echo(tanh(-10))
?>
语法
tanh(x)
参数 | 描述 |
---|---|
x | 必需。一个数。 |
说明
返回 x 的双曲正切值,定义为 sinh(arg)/cosh(arg)。