rust-random / rust-random/rand_distr
dirichlet_stability test fails on FreeBSD when compiled with cg_clif
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 26
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
cg_clif uses libm functions for most non-trivial float operations rather than x86 SSE instructions. I suspect there is a (1ULP?) inaccuracy in FreeBSD's libm implementation. In the past the same kind of error happened with MinGW, but that seems to have fixed itself at one point.
---- dirichlet_stability stdout ----
---- dirichlet_stability stderr ----
thread 'main' panicked at rand_distr/tests/value_stability.rs:362:5:
assertion `left == right` failed
left: [0.0002758045685569205, 2.296135759821706e-20, 3.004118281150937e-9, 0.9997241924273248]
right: [0.00027580456855692104, 2.296135759821706e-20, 3.004118281150937e-9, 0.9997241924273248]
Contributor guide
No contributing guide indexed for this repository
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 with rand_distr/tests/value_stability.rs at the dirichlet_stability assertion around line 362, and reproduce the failure on FreeBSD when compiled with cg_clif. Compare the differing floating-point values and investigate the reported libm behavior. Done means the stability test has an appropriate, verified result on the affected platform.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100