beetlebug▾
/

tcl::mathfunc erfcTcl 9.1 only

Gives the complementary error function of a number.

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

Description

Gives 1 minus erf(NUMBER), from 0 to 2. For a large NUMBER it keeps the digits that 1 - erf(NUMBER) loses.

Arguments

ArgumentTypeDefaultDescription
NUMBERnumberrequiredAny number.

Returns

A float from 0 to 2.

Examples

% expr {erfc(0)}
1.0

% expr {erfc(1)}
0.15729920705028513

% expr {erfc(3)}
2.2090496998585438e-5

Errors

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

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

Facts

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

See also