This site is supported by donations to The OEIS Foundation.

Template:Arcosh/doc

From OeisWiki
Jump to: navigation, search

This documentation subpage contains instructions, categories, or other information for Template:Arcosh. [<Edit> Template:Arcosh]

[⧼Purge⧽ Template:Arcosh/doc]

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

Usage

{{arcosh|a real number greater than or equal to 1}}

Valid input

A real number greater than or equal to 1 as argument.

Examples

Examples with valid input

Code Result
{{arcosh|1}} 0
{{arcosh|2}} 1.3169578969248
{{arcosh|5}} 2.2924316695612
{{arcosh|{{cosh|-1}}}} 0.99999999999996
{{arcosh|{{cosh|-0.5}}}} 0.50000000000004
{{arcosh|{{cosh|0}}}} 0
{{arcosh|{{cosh|0.5}}}} 0.50000000000004
{{arcosh|{{cosh|1}}}} 0.99999999999996

Examples with invalid input (returns an error message)

Code Result
{{arcosh|i}} Arcosh error: Argument must be a real number greater than or equal to 1
{{arcosh|-1}} Arcosh error: Argument must be a real number greater than or equal to 1
{{arcosh|-0.5}} Arcosh error: Argument must be a real number greater than or equal to 1
{{arcosh|0}} Arcosh error: Argument must be a real number greater than or equal to 1
{{arcosh|0.5}} Arcosh error: Argument must be a real number greater than or equal to 1

Code

{{ifnum| {{{1|not a number}}}
| {{#ifexpr: ({{{1}}}) >= 1
  | {{#expr: ln ( ({{{1}}}) + ( ({{{1}}})^2 - 1 )^(1/2) ) }}
  | {{error| Arcosh error: Argument must be a real number greater than or equal to 1}}
  }}
| {{error| Arcosh error: Argument must be a real number greater than or equal to 1}}
}}

See also