[expr] numeric equality operator Uses string equality if either of the arguments cannot be interpreted as numeric, but if you actually want [string equal]ity, 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. To write it a bit more clear: ====== % expr { 0 == 1E-323 } 0 % expr { 0 == 1E-324 } 1 ====== <> Operator