asinh

function asinh( x ) --> res

Description

Returns the inverse hyperbolic sine of x.

Parameters

x

Number that is computed.

Return Values

res

Inverse hyperbolic sine of x in radians.

Code

--ZFUNC-asinh-v1
local function asinh( x ) --> res
   return math.log( x + math.sqrt( x * x + 1 ) )
end

return asinh

Examples

local t = require( "taptest" )
local asinh = require( "asinh" )
local round = require( "round" )

t( round( asinh( -2.5 ), 9 ), -1.647231146 )
t( round( asinh( 10 ), 8 ), 2.99822295 )

t()

See also