[IronPython] Singles not comparing properly
Christian Muirhead
christian.muirhead at resolversystems.com
Fri Nov 3 03:24:44 PST 2006
Hi guys -
We encountered a strange bug today, which we eventually worked out was
being caused by the fact that a number we thought was a float (a Double)
was actually a Single. The problem was this:
>>> from System import Double, Single
>>> d = Double(8.0)
>>> d
8.0
>>> 5 <= d <= 500
True
>>> s = Single(8.0)
>>> s
8.0
>>> 5 <= s <= 500
False
There's no real analogue to this in CPython, but it feels like Single
and Double should behave the same here. Is this a bug?
Thanks,
Christian
More information about the users
mailing list