-
Notifications
You must be signed in to change notification settings - Fork 187
Probability Distribution and Statistical Functions -- Uniform Distribution Module #593
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
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.
Great. Thank you.
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.
Thanks very much for this!
I noticed some minor issues:
- In the documentation for
pdf_uniform
, there is no explanation of what theloc
parameter does. I think you just need to say something like:f(x)
is zero forx<loc
orx > (loc+scale)
, and otherwise .... (continue to current definition). - In the documentation for
cdf_uniform
, you should also mention that it is zero forx < loc
, and one forx > (loc+scale)
.
I also have a question about MESSENE_NUMBER
which is used to normalise the random integers to produce uniform random variables. Currently it is always double precision. Does this reflect that the random number algorithm is fundamentally double precision (like in the case of the normal distribution module). If yes, could you please add a statement in the documentation to that effect? Or, should we have the precision of MESSENE_NUMBER
varying with the precision of the inputs?
Alright, I will add description for |
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.
LGTM, thankyou.
This is a minor update version to correct precision issue. Based on the conversation here, we should provide all precision for pdf and cdf functions. Originally, uniform distribution provides only single precision for pdf and cdf.