Skip to content

Add functions that generate a random BigInt #19

@faheel

Description

@faheel

The following functions that generate a random BigInt need to be implemented under include/functions/random.hpp:

  • Having specific number of digits:

    friend BigInt big_random(size_t num_digits);

    Returns a random BigInt having the specified number of digits. If the number of digits are not specified, use a random value for it.

  • Within a certain range:

    friend BigInt big_random(const T& low, const T& high);

    Returns a random BigInt such that low <= BigInt <= high.

Note: type T can be a BigInt, std::string or long long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions