This site is supported by donations to The OEIS Foundation.

Template:Arsinh

From OeisWiki
Jump to: navigation, search

The {{arsinh}} (inverse) hyperbolic function template returns the inverse hyperbolic sine of , where is a real number.

Usage

{{arsinh|a real number}}

Valid input

A real number as argument.

Examples

Examples with valid input

Code Result
{{arsinh|-1}} -0.88137358701954
{{arsinh|-0.5}} -0.4812118250596
{{arsinh|0}} 0
{{arsinh|0.5}} 0.4812118250596
{{arsinh|1}} 0.88137358701954
{{arsinh|{{sinh|-1}}}} -1
{{arsinh|{{sinh|-0.5}}}} -0.5
{{arsinh|{{sinh|0}}}} 0
{{arsinh|{{sinh|0.5}}}} 0.5
{{arsinh|{{sinh|1}}}} 1
{{arsinh|e^15 / 2}} 15
{{arsinh|e^-15 / 2}} 1.5295116003095E-7
{{arsinh|-(e^15) / 2}} -15
{{arsinh|-(e^-15) / 2}} -1.5295116003095E-7
{{arsinh|e^30 / 2}} 30
{{arsinh|e^-30 / 2}} 4.6851411639181E-14
{{arsinh|-(e^30) / 2}} -30
{{arsinh|-(e^-30) / 2}} -4.6851411639181E-14

Examples with invalid input (returns an error message)

Code Result
{{arsinh|i}} Arsinh error: Argument must be a real number

Code

{{ifnum| {{{1|NAN}}}
| {{#ifexpr: ({{{1}}}) >= 0 
  | {{#expr: ln ( ({{{1}}}) + ( ({{{1}}})^2 + 1 )^(1/2) ) }} 
  | {{#expr: - ln ( - ({{{1}}}) + ( ({{{1}}})^2 + 1 )^(1/2) ) }} <!-- Equivalent, but avoids underflow for negative argument -->
  }}
| {{error| Arsinh error: Argument must be a real number }}
}}

See also