beetlebug▾
/

tcl::mathfunc erfTcl 9.1 only

Gives the error function of a number.

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

Description

Gives the error function of NUMBER, from -1 to 1. erf(Inf) is 1.0.

Arguments

ArgumentTypeDefaultDescription
NUMBERnumberrequiredAny number.

Returns

A float from -1 to 1.

Examples

% expr {erf(0)}
0.0

% expr {erf(1)}
0.8427007929497149

% expr {erf(-1)}
-0.8427007929497149

Errors

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

% expr {erf()}
not enough arguments for math function "erf"
-errorcode TCL WRONGARGS

Facts

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

See also