domain errors not being thrown by uniform_lpdf, discrete_uniform_lpmf, pareto_lpdf
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
Description
The uniform_lpdf, discrete_uniform_lpmf and pareto_lpdf all have support determined by parameters. When the variate is not in that support we should be throwing std::domain_error as elsewhere.
The principle at work here is that we want to fail fast with an informative error message, not just let NaN values propagate and cause rejections.
Current Version:
v3.1.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementations of uniform_lpdf, discrete_uniform_lpmf, and pareto_lpdf, then inspect comparable distributions that already throw std::domain_error for out-of-support variates. Done means each named function fails fast with an informative domain error instead of allowing NaN values to propagate, with matching tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100