2006/10/19, Raymond Hettinger <[EMAIL PROTECTED]>:

> My colleague got an odd result today that is reproducible on his build
> of Python (RedHat's distribution of Py2.4.2) but not any other builds
> ...
> >>> set(-19400000000 * (1/100.0) for i in range(10000))
> set([-194000000.0, -193995904.0, -193994880.0])

I neither can reproduce it in my Ubuntu, but analyzing the problem...
what about this?:

d = {}
for i in range(10000):
  val = -19400000000 * (1/100.0)
  d[val] = d.get(val, 0) + 1

or

d = {}
for i in range(10000):
  val = -19400000000 * (1/100.0)
  d.setdefault(val, []).append(i)

I think that is interesting to know,,,

- if in these structures the problem still happens...
- how many values go for each key, and which values.

Regards,

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to