[Ecls-list] Small problem with random on NetBSD/Sparc64
Bruce O'Neel
edoneel at sdf.lonestar.org
Fri Jul 29 04:30:24 UTC 2005
Hi,
I'm using 0.9f, and yep, that would fix it wouldn't it.
I'll start using the CVS version now :-)
Thanks very much for all of your hard work on ecl!
cheers
bruce
On Fri, Jul 29, 2005 at 11:38:28AM +0200, Juan Jose Garcia Ripoll wrote:
> 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.
>
> Juanjo
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO September
> 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
--
edoneel at sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
More information about the ecl-devel
mailing list