Version 2 of Why does Tcl think a fraction less than one is zero?

Updated 2005-01-27 21:22:54 by rdt

[Explain idioms of "computer arithmetic".]

 % expr 1/2
 0

See expr problems with int for more on integer division and how to avoid it.


rdt : 2005-01-27 : This is a property of integers that can take on values of 0,1,2,... and therefore have no values between 0 and 1. However:

 % expr 1.0 / 2
 0.5

The expected value.