beetlebug▾
/

tcl::mathfunc isunorderedTcl 9.1 only

Gives 1 when either of two numbers is NaN.

tcl::mathfunc::isunordered X Y
expr {isunordered(X, Y)}

Description

Gives 1 when X or Y is NaN, so that the two have no order, and 0 otherwise.

Arguments

ArgumentTypeDefaultDescription
XnumberrequiredAn integer of any size, a float, or NaN.
YnumberrequiredAn integer of any size, a float, or NaN.

Returns

1 or 0.

Examples

% expr {isunordered(NaN, 1)}
1

% expr {isunordered(1, NaN)}
1

% expr {isunordered(1, 2)}
0

Errors

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

% expr {isunordered("x", 1)}
expected number but got "x"
-errorcode TCL VALUE NUMBER

Facts

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

See also