beetlebug▾
/

tcl::mathfunc acoshTcl 9.1 only

Gives the inverse hyperbolic cosine of a number.

tcl::mathfunc::acosh NUMBER
expr {acosh(NUMBER)}

Description

Gives the number, 0 or more, whose hyperbolic cosine is NUMBER. NUMBER must be 1 or more.

Arguments

ArgumentTypeDefaultDescription
NUMBERnumberrequiredA number, 1 or more.

Returns

A float, 0 or more.

Examples

% expr {acosh(1)}
0.0

% expr {acosh(10)}
2.993222846126381

Errors

% expr {acosh(0.5)}
domain error: argument not in valid range
-errorcode ARITH DOMAIN {domain error: argument not in valid range}

% expr {acosh("x")}
expected floating-point number but got "x"
-errorcode TCL VALUE NUMBER

% expr {acosh(NaN)}
floating point value is Not a Number
-errorcode TCL VALUE DOUBLE NAN

Facts

Capability
None.
Tcl release
Tcl 9.1 only.
Since
ztcl 1.0.0-beta.1

See also