[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Random numbers (again) broken on 64-bit platforms
From: |
Andreas Rottmann |
Subject: |
Random numbers (again) broken on 64-bit platforms |
Date: |
Mon, 26 Jul 2010 23:01:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi!
After pulling from Git today, I noticed that `random' is still/again
broken on 64-bit platforms:
scheme@(guile-user)> (random (ash 1 32))
ERROR: In procedure random:
ERROR: Argument 1 out of range: 4294967296
This looks like being caused by
b606ff6af9c9ec7fc3c4473c09ce1e95c18f024a, which doesn't take into
account (in scm_random) that an INUM may well exceed 32 bits on 64-bit
platforms. I'll try to come up with a patch for that, unless someone
beats me to it.
Regards, Rotty
--
Andreas Rottmann -- <http://rotty.yi.org/>
- Random numbers (again) broken on 64-bit platforms,
Andreas Rottmann <=