Type conversion mysteries ?
Emile van Sebille
emile at fenx.com
Thu Sep 13 07:58:54 EDT 2001
More information about the Python-list mailing list
Thu Sep 13 07:58:54 EDT 2001
- Previous message (by thread): Java wrapper over Python
- Next message (by thread): Type conversion mysteries ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Georg Hoermann" <georg at toppoint.de> wrote in message news:qa71qtg73mtf7sb404qnh84r3kbjaf6olp at 4ax.com... > Hello World, > > can someone please explain these results: It's the order the calculations are done in. > > print 100.0*1200/2450 is 48 here you create a float 120000.0 then divide by 2450 to get 48 > print 1200/2450*100.0 gives 0 (zero ?!) here you integer divide 1200/2450 to get 0 then multiply by 100.0 This will (very likely) change in a futuure release. > > Thanks, > Georg -- Emile van Sebille emile at fenx.com ---------
- Previous message (by thread): Java wrapper over Python
- Next message (by thread): Type conversion mysteries ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list