regression: in d3.bin, values next to a threshold go into the wrong bin
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
d3.bin().domain([0, 1]).thresholds(10)([0.3 * 3]) // 0.3 * 3 is 0.8999999999999999
puts the value in the bin [0.9, 1] instead of [0.8, 0.9]. With the same thresholds passed explicitly, d3.bin().domain([0, 1]).thresholds(d3.ticks(0, 1, 10).slice(1, -1)), it goes into [0.8, 0.9].
The same happens with an integer step: d3.bin().domain([-10, 10]).thresholds(10)([1.9999999999999998]) puts the value in [2, 4] instead of [0, 2].
Since 3.1.3 (#220), when the domain is aligned with the thresholds, bin computes the index of a value's bin as Math.floor((x - x0) / step) (or Math.floor((x0 - x) * step) for a fractional step). This division or multiplication can round across an integer. Only the underestimate is corrected, and only for fractional steps. 3.1.2 put these values in the correct bins.
- 主要言語
- JavaScript
- スター
- 465
- フォーク
- 193
- 平均マージ
- 5時間 46分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
d3/d3-array のほかの issue
-
d3.nice(start, stop, 1) returns [-1e308, 1e308] when the interval contains zero, so d3.bin gives NaN bin bounds対応中かも @awais-ur-rehman が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
regression: d3.bin's last bin is twice as wide when the maximum is a threshold対応中かも @Fil が 2 日前に担当しました。 オープン
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
groupSort should use ascendingDefined instead of ascending対応中かも @cpruijsen が 58 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 10/100
メンテナーはふだん 1 日以内に返信
-
Incorrect results for binary search on large arrays due to miscomputation of midpoint対応中かも @maximilliangrand が 88 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
d3/d3-array#261 · コメント 11 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mega-yfue/ha-eufy-sdk-bridge#198 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
blamechris/chroxy#9108 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Content:WebExt needs triage
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
liberation-data/drivine#733 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信