Skip to content

Conversation

@rfl890
Copy link

@rfl890 rfl890 commented May 29, 2023

I have changed the cryptoRandom function to create an IEEE 754 double from scratch. It generates 2 random 32-bit unsigned integers using crypto.getRandomValues, and constructs a double from them. IMO this is the closest you can get to constructing a random double, as it fills the whole 53 bits (that it can represent) with random bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant