[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread R. David Murray
R. David Murray added the comment: Excellent. Thanks for testing. And thanks for pointing out the duplicate, Peter. -- assignee: ronaldoussoren -> resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Value returned by random.random() out of v

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen
Floris van Manen added the comment: On 25 Jan 2013, at 22:27, Stefan Krah wrote: > Then always call python with the full path. If your app is a simple > script, t ok, managed to install the extra packages and run the app. Seems to work correctly now, no more random() >= 1.0 (thanks!) .F -

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen
Floris van Manen added the comment: On 25 Jan 2013, at 22:27, Stefan Krah wrote: > Then always call python with the full path. If your app is a simple > script, then: > > /tmp/usr/bin/python app.py ok. and how do i add extra packages to that new python version ? e.g. i need to install pyyam an

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah
Stefan Krah added the comment: Floris van Manen wrote: > Did compile that version and it launches. > To test with my code i do not want to have it interfere with my current > version. > I remember it is possible to setup n isolated environment with pip en > virtualenv. > But i never did this s

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen
Floris van Manen added the comment: On 25 Jan 2013, at 19:35, Stefan Krah wrote: > > Stefan Krah added the comment: > > Floris van Manen wrote: >> From what i understand is that issue14591 was able to reproduce the same >> feature as it seems related to the jumpahead() malfunctioning. > >

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah
Stefan Krah added the comment: Floris van Manen wrote: > From what i understand is that issue14591 was able to reproduce the same > feature as it seems related to the jumpahead() malfunctioning. I'm also quite sure that it's the same issue. It would be nice to have confirmation though. If you

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen
Floris van Manen added the comment: On 25 Jan 2013, at 11:07, Stefan Krah wrote: > > Stefan Krah added the comment: > >> It is in the combination with jumpahead(), getstate(), setstate() that >> you'll experience random() to produce values >= 1.0 > > Let me reiterate what David said: Can you

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah
Stefan Krah added the comment: > It is in the combination with jumpahead(), getstate(), setstate() that you'll > experience random() to produce values >= 1.0 Let me reiterate what David said: Can you post a self-contained program that exhibits the issue? -- nosy: +skrah __

[issue17020] random.random() generating values >= 1.0

2013-01-24 Thread Floris van Manen
Floris van Manen added the comment: It is in the combination with jumpahead(), getstate(), setstate() that you'll experience random() to produce values >= 1.0 .F On 25 Jan 2013, at 06:24, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Can you show how you determined t

[issue17020] random.random() generating values >= 1.0

2013-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can you show how you determined that you got a value >= 1.0 or provide a seed that reproduces the problem? I'm not seeing an issue on the 2.7.3 64-bit Mac build: >>> from itertools import starmap, repeat >>> from random import random, seed >>> seed(56019413

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread R. David Murray
R. David Murray added the comment: hg pull http://hg.python.org/cpython hg up 2.7 There are also git and bzr mirrors, but I don't know their urls or how up to date they are. We could also just close this as a dup if you are pretty sure its the same problem (which it certainly sounds like it i

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen
Floris van Manen added the comment: indeed, looks like the same. .F On 23 Jan 2013, at 19:09, Peter Otten wrote: > > Peter Otten added the comment: > > This could be a duplicate of issue14591. > > -- > nosy: +peter.otten > > ___ > Python tracker

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen
Floris van Manen added the comment: On 23 Jan 2013, at 19:18, R. David Murray wrote: > > R. David Murray added the comment: > > That indeed looks likely. Fortunately there will be a new release of 2.7 > including that fix soon. > > Floris, do you have any way to test against 2.7 tip? using

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread R. David Murray
R. David Murray added the comment: That indeed looks likely. Fortunately there will be a new release of 2.7 including that fix soon. Floris, do you have any way to test against 2.7 tip? -- ___ Python tracker ___

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Peter Otten
Peter Otten added the comment: This could be a duplicate of issue14591. -- nosy: +peter.otten ___ Python tracker ___ ___ Python-bugs-l

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread R. David Murray
R. David Murray added the comment: Can you post a small program that demonstrates the problem? I'm certainly not seeing a problem just calling random.random() (and would be very surprised if I did). -- nosy: +r.david.murray ___ Python tracker

[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen
New submission from Floris van Manen: I recently noticed that the standard random() function generates values >= 1.0 As processes are called from an event scheduler, each process has its own Random() instance. self.random = random.Random(seed) self.randomState = self.random.getstate()