libera/#sicl - IRC Chatlog
Search
12:33:40
Bike
"the procedure ugfsr_CreateMT19937_98() based on the Mersenne Twister [15] MT19937 to generate floats in TestU01 [10] passes the Small Crush battery of tests without failure, even though all double precision numbers produced have the 32nd bit of their fractional part always set to '1,' and their 31st bit has a 75% chance of being '0'" god forbid
12:48:34
scymtym
ACTION is still recovering from https://github.com/sbcl/sbcl/commit/3f6e9bc23 , https://github.com/sbcl/sbcl/commit/97ce63359 , https://github.com/sbcl/sbcl/commit/ef1ff011f
12:51:33
Duuqnd
I did it in a sorta lazy way and just used two random numbers, one for the integer part and one for the decimal part.
12:52:21
Duuqnd
It works but I'm sure it's easy to find problems with it for someone more knowledgeable about floats
13:01:32
Bike
i guess the basic issue is the float exponent should actually follow a geometric distribution
13:01:54
Bike
https://allendowney.com/research/rand/downey07randfloat.pdf has a simple algorithm but might not be fast
13:10:56
Duuqnd
I could use that but it seems to require poking around the bits of the float and I don't know what the proper way for a SICL module to do that would be.
13:21:31
Duuqnd
My crappy method should work for now but I'll make sure to replace it before opening a pull request