Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-27 Thread Alexander Burger
Hi Christophe, > Would it be possible to just cast (Seed >>> 32) to a long: > > if ((n = evInt(ex.Cdr) + 1 - ((Number)x).Cnt) != 0) > n = (long)(Seed >>> 32) % n; Yes, this seems to be a good idea. The (long) cast should not be needed, as 'Seed' and 'n' already are long numbers. So if I cha

Re: In ersatz, seed is not returning a "small" number

2015-04-27 Thread Alexander Burger
Hi Christophe, > In seed, line 3310 of fun.src, I'd suggest a 32 bits shift then a cast > to an int for the result to conform to the docs: > http://www.software-lab.de/doc/refS.html#seed > > n = (int)((initSeed(ex.Cdr.Car.eval()) * 6364136223846793005L) >>> 32); Good, but this is not completely

In ersatz, seed is not returning a "small" number

2015-04-27 Thread Christophe Gragnic
Dear list, In seed, line 3310 of fun.src, I'd suggest a 32 bits shift then a cast to an int for the result to conform to the docs: http://www.software-lab.de/doc/refS.html#seed n = (int)((initSeed(ex.Cdr.Car.eval()) * 6364136223846793005L) >>> 32); chri -- http://profgra.org/lycee/ (site pro

unsubscribe

2015-04-27 Thread Will Arnold
Good bye Will Arnold :-( You are now unsubscribed -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-27 Thread Christophe Gragnic
On Mon, Apr 27, 2015 at 8:01 AM, Alexander Burger wrote: > […] > A shift of 32 bits, however, would not suffice, because > it would put the sign bit of the original 64-bit number into the MSB of > the result. OK, I understand. I have some more ideas to try to make the behaviors of (rand m n) in

subscribe

2015-04-27 Thread Will Arnold
Hello Will Arnold :-) You are now subscribed -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: MySQL native C wrapper

2015-04-27 Thread Henrik Sarvell
Yes, you're right, I'll remove it and "link" straight to the lib, it was something I did in the beginning of the process when I was unsure of how transparently I could pass references to structs around. As it turned out it's completely seamless so your suggestion makes perfect sense, or be my gues