* Louki Sumirniy <louki.sumirniy.stal...@gmail.com> [190226 06:22]:
> Assuming there is bytes in the system's entropy pool, you can also skip the 
> scrambling step, though I don't know what overhead consuming these bytes 
> entails compared to a standard PRNG. Then the biggest part of it is making 
> the raw bytes into float. I'm not sure - could you take 4 random bytes, 
> grab the unsafe pointer and cast back to float32?

No, you could get one of many NANs.  However, converting uint16 to
float32 (or float64) should be very efficient, then you have one
floating point divide by constant to get the desired range.

...Marvin

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to