I implemented PQuantile for Uniform.
In implementing quantile, I chose to return a for 0.0 and b for 1.0 to make quantile symmetric with cdf.
I added a cdf-and-quantile-are-inverses test for Uniform. In implementing the test, I realized that a < b and so copied the generator you had in the uniform-does-not-exceed-bounds test and made it a helper function gen-two-ascending-ints. I did not reuse the helper function uniform-does-not-exceed-bounds so as to keep the diffs small and to not disturb existing code. But happy to do the refactor if you're okay with it.
I also added an assert for a < b. However that caused other tests to fail. So, for now I have commented out the assert. After investigation, I found that several of the tests using the Uniform distribution do not guarantee that a < b. I am happy to fix those if you are okay with it.
During the investigation, I also noticed that in some tests for Normal, the scale parameter could be negative. Is that okay? Or should it be > 0. Noticed a similar issue with a LogNormal test. Again happy to fix these if you'd like.
In order to keep the PRs small and focussed, I suggest that the test bugfixes be in a different PR. But happy to add those to this PR if you'd prefer. Just let me know.
I implemented PQuantile for Uniform. In implementing quantile, I chose to return a for 0.0 and b for 1.0 to make quantile symmetric with cdf.
I added a cdf-and-quantile-are-inverses test for Uniform. In implementing the test, I realized that a < b and so copied the generator you had in the uniform-does-not-exceed-bounds test and made it a helper function gen-two-ascending-ints. I did not reuse the helper function uniform-does-not-exceed-bounds so as to keep the diffs small and to not disturb existing code. But happy to do the refactor if you're okay with it.
I also added an assert for a < b. However that caused other tests to fail. So, for now I have commented out the assert. After investigation, I found that several of the tests using the Uniform distribution do not guarantee that a < b. I am happy to fix those if you are okay with it.
During the investigation, I also noticed that in some tests for Normal, the scale parameter could be negative. Is that okay? Or should it be > 0. Noticed a similar issue with a LogNormal test. Again happy to fix these if you'd like.
In order to keep the PRs small and focussed, I suggest that the test bugfixes be in a different PR. But happy to add those to this PR if you'd prefer. Just let me know.
Also updated test.check.