Subject: Re: Simple calculation error
On Jan 4, 12:30 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Francois Liot wrote:
>
> > I observed a strange calculation answer, on both python 2.3.4 and 2.4.4
>
> >> >> print 753343.44 - 753361.89
>
> > -1
On Jan 4, 12:30 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Francois Liot wrote:
>
> > I observed a strange calculation answer, on both python 2.3.4 and 2.4.4
>
> >> >> print 753343.44 - 753361.89
>
> > -18.450001
>
> >> >> print ( (753361.89*100) - (753343.44*100) ) / 100
>
> > 18.45
>
> >
Francois Liot wrote:
>
> I observed a strange calculation answer, on both python 2.3.4 and 2.4.4
>
>> >> print 753343.44 - 753361.89
>
> -18.450001
>
>> >> print ( (753361.89*100) - (753343.44*100) ) / 100
>
> 18.45
>
> Can somebody help me to play correctly with decimal values?
A 64-bit
Dear all,
I observed a strange calculation answer, on both python 2.3.4 and 2.4.4
>>> print 753343.44 - 753361.89
-18.450001
>>> print ( (753361.89*100) - (753343.44*100) ) / 100
18.45
Can somebody help me to play correctly with decimal values?
Thanks in advance,
Francois