[Ecls-list] Small problem with random on NetBSD/Sparc64

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri Jul 29 02:39:14 UTC 2005

On Fri, 2005-07-29 at 09:23 +0000, Bruce O'Neel wrote:
> In src/c/num_rand.d:
> d = (double)(rs->random.value>>1) / (4294967296.0/2.0);
> I can't easly find it, but, would .value happen to be a long?  If so
> this expresion won't work when long is 8 bytes rather than 4 since
> 4294967296.0 looks just like 2^32 in float.

If you see a few lines below, you will find that random.value is masked
to be 32 bits long.
	rs->random.value = rs->random.value & 0xffffffff;
This line might be missing in older versions of ECL.


More information about the ecl-devel mailing list