chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] random returns the same number on x86_64 a


From: Jim Ursetto
Subject: Re: [Chicken-hackers] [PATCH] random returns the same number on x86_64 all the time
Date: Sat, 3 Mar 2012 22:59:02 -0600

Just keep in mind that rand() will still only return a 31-bit value regardless, 
so your 62-bit value has only 31 bits of precision.

most-positive-fixnum -> 4611686018427387903
(random most-positive-fixnum)
  -> 0, 2147483648,  4294967296,  6442450944, ..., 4611686016279904256
  == 0, 0x80000000, 0x100000000, 0x180000000, ..., 0x3fffffff80000000

In this case the bottom 31 bits are always zero.

On Mar 3, 2012, at 7:11 AM, Felix wrote:

> From: Peter Bex <address@hidden>
> Subject: [Chicken-hackers] [PATCH] random returns the same number on x86_64 
> all the time
> Date: Wed, 29 Feb 2012 21:00:26 +0100
> 
> Signed off and pushed.
> 
> 
> cheers,
> felix
> 
> _______________________________________________
> Chicken-hackers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]