13 Dec
2000
13 Dec
'00
8:32 p.m.
On Wed, 13 Dec 2000, Andy McKay wrote:
<dtml-var "3/2" fmt="%.2d"> instead of getting 1.50 as I was expecting I get 1.00, I never seem to be getting decimals. Whats the obivous thing Im missing here?
Python Reference Manual, chapter 5.6: The / (division) operator yields the quotient of its arguments. The numeric arguments are first converted to a common type. Plain or long integer division yields an integer of the same type; the result is that of mathematical division with the `floor' function applied to the result. Try: 3.0/2 ololo@zeus.polsl.gliwice.pl /--------------------------------------\ | `long long long' is too long for GCC | \--------------------------------------/