Python can't divide??!?!
Erik Max Francis
max at alcyone.com
Thu Feb 5 22:08:51 EST 2004
Dan Williams wrote:
> Fire up python or whatever.
>
> Do this: Result:
>
> 3 / 5 0 Fair enough, int / int = int
> 3 / 5.0 0.59999999999999998 eh?
> 3.0 / 3 0.59999999999999998 ummmm...
> 3.0 / 5.0 0.59999999999999998 how did I guess...
>
> That's just an example. Python cannot divide. Period.
Neither can C, C++, Java, Perl, or any of the other countless
programming languages which use floating point.
--
__ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ I thought I might never see another Saturday night.
-- Robert S. MacNamara
More information about the Python-list
mailing list