This site is supported by donations to The OEIS Foundation.
Template:Tanh
From OeisWiki
The following documentation is located at Template:Tanh/doc. [<Edit> Template:Tanh/doc]
[⧼Purge⧽ Template:Tanh]
[⧼Purge⧽ Template:Tanh]
The {{tanh}} hyperbolic function template returns the hyperbolic tangent of , where is a real number.
Contents
Usage
- {{tanh|a real number}}
Valid input
- A real number as argument.
Examples
Examples with valid input
Code Result {{tanh|-1}} -0.76159415595576 {{tanh|-0.5}} -0.46211715726001 {{tanh|0}} 0 {{tanh|0.5}} 0.46211715726001 {{tanh|1}} 0.76159415595576
Examples with invalid input (returns an error message)
Code Result {{tanh|i}} Tanh error: Argument must be a real number
Code
{{ifnum| {{{1|NAN}}} | {{#expr: ( exp (2*({{{1}}})) - 1 ) / ( exp (2*({{{1}}})) + 1 ) }} | {{error| Tanh error: Argument must be a real number }} }}
See also