4 ms·
Very, very nice. Julia currently uses the same trick as Lua (generate uniform Float64 bit pattern between 1 and 2 by masking a random UInt64 and reinterpreting
by FabHK 3y ago
Very, very nice.
Julia currently uses the same trick as Lua (generate uniform Float64 bit pattern between 1 and 2 by masking a random UInt64 and reinterpreting, then subtract 1).
I wonder what the speed is.
Having the “other” half open unit interval in addition to the traditional one might come in handy for several applications.
- adgjlsfhk1 3y agoFor rngs that natively generate 64 bits (some only give you 52 bits at a time), the speed is really good.