2007/8/28, Stefan van der Walt <[EMAIL PROTECTED]>:
> I find this behaviour odd for addition.  Under python:
>
> In [7]: 0.8+0.2 > 1.0
> Out[7]: False

Keep in mind that both 0.2 and 0.8 cannot be represented exactly as
floating-point numbers (unless you use decimal floating points, like
the "decimal" module), so the starting point isn't what it appears to
be.

> Sum: 1.00000000000000000000000000000000000000000000000000
> Is greater than 1.0? True

I get True on a x86, gcc-3.3.1, numpy-1.0b5, GNU/Linux box, and False
on x86_64, gcc-4.1.1, numpy-1.0.3.1, GNU/Linux.

YMMV ;-)

-- 
Lino Mastrodomenico
E-mail: [EMAIL PROTECTED]
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to