-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Consider adding BigFloat support for randn/randexp #17629
Comments
x-ref #13950 |
I wonder what bits of the Marsaglia and Tsang paper need to be reworked to do this right. |
cf http://randomlib.sourceforge.net/html/index.html, which has an MIT/X11 license. |
Also http://exrandom.sourceforge.net/ |
Looks like MPFR implements the cited paper: https://gforge.inria.fr/scm/viewvc.php/mpfr/trunk/src/nrandom.c?view=markup. Any reason we don't just hook this up? |
Seems like a good project for someone to tackle! |
I guess this would be easy, but AFAIU, MPFR doesn't allow to pass our own random RNGs. So if we want to do this, we should IMHO first wrap GMP RNG into a proper Julia type, and then provide only |
Or patch GMP to allow arbitrary RNGs—that might not be so hard and I bet they'd accept a patch. |
bump! this is sorely missing. anyone looking for a project could try this. |
Actually I was wrong (unless this changed recently), you can pass your RNG, albeit in a quite involved way. |
#17627 adds MethodError domain checks that you cannot call
randn
orrandexp
for any types besides the currently supportedFloat16,Float32,Float64
.Do we also want to extend support to
BigFloat
? I don't know much about, but I've left TODO code comments in #17627 (comment) asking to consider this question.This is a tracking issue for that discussion.
The text was updated successfully, but these errors were encountered: