uniform_int_distribution misbehaves if the range exceeds the range of the underlying rng_engine
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 領域
- backend
調査の方向性
Start at lib/github.com/diku-dk/cpprandom/random.fut lines 486-487, focusing on the loop that computes secure_max for uniform_int_distribution. Reproduce the supplied program and confirm that the distribution terminates when the requested range exceeds the underlying rng range, without leaving the distribution unbalanced.
索引モデルが issue の本文から書いたものです。
説明
For example, this program will not terminate:
import "lib/github.com/diku-dk/cpprandom/random"
module rng = minstd_rand
module dist = uniform_int_distribution u32 rng
let main (seed: i32) =
let r = rng.rng_from_seed [seed]
in dist.rand (rng.min,rng.max+1) r
The problem is this loop where it tries to ensure that the distribution is not unbalanced. If the range is too great, then secure_max becomes 0, and the loop becomes infinite.
- 主要言語
- Futhark
- スター
- 4
- フォーク
- 3
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3312 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
needs-acceptance wg/data-plane-networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/semantic-router#4024 · コメント 1 件 ·
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
amponce/archive-movie-browser#165 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100