This site is supported by donations to The OEIS Foundation.

Template:Artanh/doc

From OeisWiki
Jump to: navigation, search

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

[⧼Purge⧽ Template:Artanh/doc]

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

Usage

{{artanh|a real number in open interval (-1, +1)}}

Valid input

A real number in open interval (-1, +1) as argument.

Examples

Examples with valid input

Code Result
{{artanh|-0.95}} -1.8317808230648
{{artanh|-0.5}} -0.54930614433405
{{artanh|-0.3}} -0.30951960420311
{{artanh|0}} 0
{{artanh|0.3}} 0.30951960420311
{{artanh|0.5}} 0.54930614433405
{{artanh|0.95}} 1.8317808230648
{{artanh|{{tanh|-1}}}} -0.99999999999999
{{artanh|{{tanh|-0.5}}}} -0.5
{{artanh|{{tanh|0}}}} 0
{{artanh|{{tanh|0.5}}}} 0.5
{{artanh|{{tanh|1}}}} 0.99999999999999

Examples with invalid input (returns an error message)

Code Result
{{artanh|i}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|-5}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|-2}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|-1}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|1}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|2}} Artanh error: Argument must be a real number in open interval (-1, +1)
{{artanh|5}} Artanh error: Argument must be a real number in open interval (-1, +1)

Code


{{ifnum| {{{1|not a number}}}
| {{#ifexpr: abs ({{{1}}}) < 1
  | {{#expr: ( ln ( (1 + ({{{1}}})) / (1 - ({{{1}}})) ) ) / 2 }}
  | {{error| Artanh error: Argument must be a real number in open interval (-1, +1) }}
  }}
| {{error| Artanh error: Argument must be a real number in open interval (-1, +1) }}
}}

See also