Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rand(::Range{BigInt}) #9122

Merged
merged 1 commit into from
Dec 2, 2014
Merged

Implement rand(::Range{BigInt}) #9122

merged 1 commit into from
Dec 2, 2014

Commits on Dec 2, 2014

  1. implement rand(::Range{BigInt})

    * Previously, calling e.g. rand(big(1:4)) caused a stack overflow,
      because rand(mt::MersenneTwister, r::AbstractArray) was calling
      itself recursively. This is fixed here, but a mecanism handling
      not-implemented types should be added.
    * RandIntGen is renamed to RangeGeneratorInt.
    * A type RangeGeneratorBigInt similar to RangeGeneratorInt (both
      subtypes of RangeGenerator) is introduced to handle rand on
      BigInt ranges. RangeGenerator is the generic constructor of such
      objects, taking a range as parameter.
      Note: two different versions are implemented depending on the
      GMP version (it is faster with version 6 on big ranges).
    * BigInt tests from commit bf8c452 are re-added.
    rfourquet committed Dec 2, 2014
    4 Configuration menu
    Copy the full SHA
    79e4104 View commit details
    Browse the repository at this point in the history