[Ecls-list] Re: Still seeing (random <larger integer>) ==> 0

Paul F. Dietz dietz at dls.net
Sat Mar 5 11:17:58 UTC 2005


Dave wrote:

> These work fine for me on a pentium 4, but things got wierd
> on an amd64 64-bit installation where even low fixnums generated 0. The
> random generator apparently expects the internal random state to be
> clamped to 32 bits. I added some casts to advance_random_state() in
> src/c/num_rand.d and it seems to work now.
> You mentioned redhat 9, any chance you are on a 64-bit cpu?

I'm on a 32 bit Athlon XP+.

I have managed to make the problem go away, by specifying the
C compiler to be gcc 2.96.  The previous version was gcc 3.2.2
(the default in Redhat 9).  I suspect there's either a compiler
bug or some problem in the RANDOM code that the newer, perhaps
more C-stanard-assuming compiler is tripping up on.

	Paul





More information about the ecl-devel mailing list