tcl::mathfunc atanhTcl 9.1 only
Gives the inverse hyperbolic tangent of a number.
tcl::mathfunc::atanh NUMBER
expr {atanh(NUMBER)}
Description
Gives the number whose hyperbolic tangent is NUMBER. NUMBER must be from -1 to 1. atanh(1) is Inf, and atanh(-1) is -Inf.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| NUMBER | number | required | A number from -1 to 1. |
Returns
A float.
Examples
% expr {atanh(0.5)}
0.5493061443340548
% expr {atanh(1)}
Inf
% expr {atanh(-1)}
-Inf
Errors
% expr {atanh(2)}
domain error: argument not in valid range
-errorcode ARITH DOMAIN {domain error: argument not in valid range}
% expr {atanh("x")}
expected floating-point number but got "x"
-errorcode TCL VALUE NUMBER
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 only.
- Since
- ztcl 1.0.0-beta.1