expr numeric equality operator
Uses string equality if either of the arguments cannot be interpreted as numeric, but if you actually want string equality, use the eq operator instead.
% expr { 1 == 2 } 0 % expr { 1 == 1 } 1 % expr { 0x1f == 31 } 1
To show you should be careful comparing floats:
% expr { 1 == 1.0000000000000001110223 } 1
Comparing with zero is a lot safer:
expr { 0 == 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 } 0
but
expr { 0 == 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 } 1
So from 1E-324 Tcl does not see the difference with zero any-more.