This site is supported by donations to The OEIS Foundation.

Template:Coth/doc

From OeisWiki
Jump to: navigation, search

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

[⧼Purge⧽ Template:Coth/doc]

The {{coth}} hyperbolic function template returns the hyperbolic cotangent of , where is a nonzero real number.

Usage

{{coth|a nonzero real number}}

Valid input

A nonzero real number as argument.

Examples

Examples with valid input

Code Result
{{coth|-1}} -1.3130352854993
{{coth|-0.5}} -2.1639534137387
{{coth|0.5}} 2.1639534137387
{{coth|1}} 1.3130352854993

Examples with invalid input (returns an error message)

Code Result
{{coth|0}} Coth error: Argument must be a nonzero real number
{{coth|i}} Coth error: Argument must be a nonzero real number

Code

{{ifnum| {{{1|NAN}}}
| {{#ifexpr: ({{{1}}}) = 0
  | {{error| Coth error: Argument must be a nonzero real number }}
  | {{#expr: 1 / {{tanh| {{{1}}} }} }}
  }}
| {{error| Coth error: Argument must be a nonzero real number }}
}}

See also