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

rand(::BigFloat) #13948

Closed
mschauer opened this issue Nov 11, 2015 · 5 comments
Closed

rand(::BigFloat) #13948

mschauer opened this issue Nov 11, 2015 · 5 comments
Labels
domain:bignums BigInt and BigFloat domain:randomness Random number generation and the Random stdlib

Comments

@mschauer
Copy link
Contributor

We once had a rand! for BigFloats using mpfr_urandom, see #4845.
Apparently this got removed/got lost. As said in #9836 "probably not high priority other than for completeness". I ran into this when calling iterative algorithms parametrized by element-type T which starting from a random vector rand(T,n).

@stevengj
Copy link
Member

Apparently it got reverted by @ViralBShah because it broke the build: 1a8885b

@mschauer
Copy link
Contributor Author

I looked at it - oh man - that is bit tricky: mpfr really wants to use the gmp random number generator and does not allow to provide entropy directly.

@StefanKarpinski
Copy link
Sponsor Member

We may have to fork it – it wouldn't be the first time :-. Longer term the MPFR project may be receptive to upstreaming changes that allow using other sources of entropy.

@mschauer
Copy link
Contributor Author

I made a PR with a let's call it economic approach without attempting to circumvent GPM.

@mschauer
Copy link
Contributor Author

cc @andrioni

@rfourquet rfourquet added domain:bignums BigInt and BigFloat domain:randomness Random number generation and the Random stdlib labels Jul 9, 2017
rfourquet added a commit that referenced this issue Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:bignums BigInt and BigFloat domain:randomness Random number generation and the Random stdlib
Projects
None yet
Development

No branches or pull requests

4 participants