Re: float comparison confusion

2007-01-19 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Type "help", "copyright", "credits" or "license" for more information. > >>> cmp(20.10, 20.9) > -1 > > Why is cmp returning -1 instead of returning positive integer? >>> 20.10 < 20.9 True >>> 20.1 < 20.9 True >>> 20.10 == 20.1

Re: float comparison confusion

2007-01-19 Thread skip
chrolson> Why is cmp returning -1 instead of returning positive integer? Last time I checked 20.1 was less than 20.9. Skip -- http://mail.python.org/mailman/listinfo/python-list

float comparison confusion

2007-01-19 Thread [EMAIL PROTECTED]
Type "help", "copyright", "credits" or "license" for more information. >>> cmp(20.10, 20.9) -1 Why is cmp returning -1 instead of returning positive integer? -- http://mail.python.org/mailman/listinfo/python-list