1.090516455488E9 / 1000000.000 ???

Adam DePrince adam.deprince at gmail.com
Tue Mar 28 18:05:10 CEST 2006


On Tue, 2006-03-28 at 16:29 +0200, Math wrote:
> Hello,
> 
> I got a simple and probably stupid newby question..
> When I compute: 
> 1.090516455488E9 / 1000000
> the result is 1090516455.49
> Should be 1090516455.488

>>> repr( 1.090516455488E9/1000000 )
'1090.516455488'
>>>

Works for me.  Code snippet?  Print does seem to round at 12 digits.  

>>> print  1.090516455488E9/1000000
1090.51645549
>>>


Cheers - Adam DePrince

> 
> I know something with float and //...
> 
> Anybody?
> How do I get correct number?




More information about the Python-list mailing list