Skip to content

math/rand: add a Uint64 method #4254

@gopherbot

Description

@gopherbot

by jacobsa@google.com:

The Rand interface has methods for several types of random integers, including
uint32 and int63, but no uint64. I need random integers in [0, 2^64). I can of
course use two calls to Uint32 to do what I need, but see discussion here:

    https://groups.google.com/group/golang-nuts/browse_thread/thread/2a57bcef8953d44a/335e3adb37bb4333

It would be nice to add this for 2.0, or whenever it's next okay to make a
break with the current API.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions