Math 函数
在线手册:中文 英文
PHP手册

asinh

(PHP 4 >= 4.1.0, PHP 5)

asinh反双曲正弦

说明

float asinh ( float $arg )

返回 arg 的反双曲正弦值,即,其双曲正弦为 arg 的那个值。

参见: asin()acosh(),和 atanh()

参数

arg

The argument to process

返回值

The inverse hyperbolic sine of arg

更新日志

版本 说明
5.3.0 This function is now available on all platforms

参见


Math 函数
在线手册:中文 英文
PHP手册
PHP手册 - N: 反双曲正弦

用户评论:

ape_cwb at yahoo dot com dot br (15-Nov-2007 01:40)

The correct implementation of asinh(x) for Windows plataform is:

-------------------------------------------------------
function asinh($x)
{
        return ln($x + sqrt(1 + pow($x, 2)));
}

function ln($x)
{
     return $x = log($x)/log(M_E);
}
--------------------------------------------------------

The worksheet above includes a comparation about the native asinh(x) and the implemented version using LN and LOG (like Snoyes posted on 27-Dec-2005 07:42)

http://www.mavadesign.com.br/allan/asinh(x).xls

This implementation using LN, give THE SAME results that function asinh(x) linux native.

Allan Patrick Engel
Curitiba - Paraná - Brasil

Arakrys (08-Jun-2007 08:57)

When using snoyes alternative bcasinh function, don't forget to check the precision of each single bcfunction or the default precision of ini setting bcmath.scale.

snoyes at gmail dot com (27-Dec-2005 03:42)

asinh for windows:

The definition for asinh is asinh(z) = log(z + sqrt(z^2 + 1))

The built-in math functions and operators give poor results for small values of z.  The BCMath version produces closer results, but still quite distant if z < 1.  A BCMath version of the log function might help.

if (!function_exists("asinh")) {
    function asinh($z) {
      return log($z + sqrt($z^2 +1));
    }
}

if (!function_exists("bcasinh")) {
    function bcasinh($z) {
      return log(bcadd($z, bcsqrt(bcadd(bcpow($z, 2), 1))));
    }
}