tcl::mathfunc lgammaTcl 9.1 only
Gives the natural logarithm of the absolute value of the gamma function.
tcl::mathfunc::lgamma NUMBER
expr {lgamma(NUMBER)}
Description
Gives the logarithm of the absolute value of gamma(NUMBER). It is finite for arguments where gamma gives Inf, such as 200. At zero and at a negative whole number it is Inf.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| NUMBER | number | required | Any number. |
Returns
A float.
Examples
% expr {lgamma(10)}
12.801827480081469
% expr {lgamma(100)}
359.1342053695754
% expr {lgamma(0)}
Inf
% expr {lgamma(-1)}
Inf
Errors
% expr {lgamma("x")}
expected floating-point number but got "x"
-errorcode TCL VALUE NUMBER
% expr {lgamma()}
not enough arguments for math function "lgamma"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 only.
- Since
- ztcl 1.0.0-beta.1