Version 3 of Inf

Updated 2007-02-23 15:13:53 by suchenwi

[Replace this comment with a discussion of the value Inf that may be returned by Tcl (or perhaps by some code being used by Tcl)]

RS 2007-02-23: Inf is for infinity. From Tcl 8.5 it is a valid double (though not integer) value, as these experiments in an 8.5a4 tclkit show:

 (bin) 3 % set x [expr 1/0.]
 Inf
 (bin) 4 % expr $x+1
 Inf
 (bin) 5 % expr $x*$x
 Inf
 (bin) 6 % expr $x-$x
 domain error: argument not in valid range
 (bin) 7 % expr -$x
 -Inf
 (bin) 8 % expr -$x+$x
 domain error: argument not in valid range
 (bin) 9 % expr {$x+1 == $x}
 1


Category Glossary