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( "tapered" )
local asinh = require( "asinh" )
-- util functions
local round = require( "round" )

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

t.done()

See also