Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-write median(Binomial) to improve speed (#1928)
* Speed up median(Binomial) Follow suggestion from #1926 to reduce `cdf(Binomial)` evaluations. * Simplify bound condition Co-authored-by: Andreas Noack <[email protected]> * Fix name of argument variable Co-authored-by: David Widmann <[email protected]> * Simplify b Co-authored-by: Andreas Noack <[email protected]> * Fix cummulative probability check Co-authored-by: David Widmann <[email protected]> * Incorporate suggestions from PR review * Further simplifications following suggestions * Add more tests * Fixed checks for median bounds * Simplified tests a bit * Update src/univariate/discrete/binomial.jl Co-authored-by: David Widmann <[email protected]> * Update src/univariate/discrete/binomial.jl Co-authored-by: David Widmann <[email protected]> * Update src/univariate/discrete/binomial.jl Co-authored-by: David Widmann <[email protected]> * Avoid test memory allocation with an iterator Co-authored-by: David Widmann <[email protected]> --------- Co-authored-by: Andreas Noack <[email protected]> Co-authored-by: David Widmann <[email protected]>
- Loading branch information