-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added random function #401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I am just a minute too late with my comment but I think it might be worth to think about if the For many applications one will need to scale the default [0, 1) interval and to me |
We don't have optional parameters at the moment so we might want to leave it until that's implemented. |
@Bzero Thank you for your comment. I had similar thoughts before merging. But I was hoping that we could now implement a function like rand(a, b) or randint(from, to) using that one source of randomness |
Yes that sounds reasonable, it would probably make sense to implement these features in a module in numbat itself. |
Yes, absolutely. That's what I meant. Should have mentioned it. In general, I try to keep the FFI as small as possible. And everything we implement in Numbat itself is a good test for the language. |
This PR add a
random()
function.Example output:
Let me know if I should change anything!