Re: 1.090516455488E9 / 1000000.000 ???
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: 1.090516455488E9 / 1000000.000 ???

From: Adam DePrince <adam.deprince@gmail.com>
Date: Tue Mar 28 2006 - 18:05:10 CEST

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?
Received on Sun Apr 30 21:25:51 2006