#481 `iszero` workaround
まだ誰も着手していません。
評価
調査の方向性
BesselK.jl の src/besk_temme.jl の 43 行目付近にある報告された呼び出しから始め、ForwardDiff.Dual が現在 iszero および ForwardDiff.value とどのように相互作用するかを調査してください。サポート対象の汎用的なゼロ値チェックまたは公開アクセサーが意図されているかを明確にしてください。ForwardDiff の内部実装にユーザーが依存する必要をなくす、合意された API または文書化されたアプローチが定まれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Like a couple other people here, I am experiencing some issues with #481. My issue is in BesselK.jl, where I have some very specific methods that branch on an iszero(x) that were broken (for example).
I understand the logic of the change and clearly an argument can be made for it, but it is disappointing that the only solution I can come up with now is to bring ForwardDiff into the dependency tree and define ugly methods
_iszero(x) = iszero(x)
_iszero(x::ForwardDiff.Dual) = _iszero(ForwardDiff.value(x))
I am sure that it's too late to argue for just reverting #481, but it would be nice if there were some way to check that ForwardDiff.value(x) is zero without having to bring ForwardDiff into the tree. Is there some other generic comparison method in Base or something that ForwardDiff can add methods to that checks for zero values? Or is there some getter function that one can use to get ForwardDiff.value(x)? I'm very happy to write a different check than iszero---but I think it would be nice for the check to be possible without bringing the internal getters of ForwardDiff.jl into scope.
Excuse me if I'm using any incorrect terminology and thanks in advance for any thoughts you can share on this.
- 主要言語
- Julia
- スター
- 1k
- フォーク
- 162
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaDiff/ForwardDiff.jl のほかの issue
-
missing floatmin, floatmax, and issubnormal for Dual対応中かも @devmotion が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliaDiff/ForwardDiff.jl#852 · コメント 6 件 ·
-
`fma` and `muladd` ignore NaN-safe mode対応中かも @devmotion が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
JuliaDiff/ForwardDiff.jl#860 ·
-
Enable NaN-safe mode by default対応中かも @devmotion が 2 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaDiff/ForwardDiff.jl#857 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
JuliaDiff/ForwardDiff.jl#854 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
JuliaDiff/ForwardDiff.jl#849 ·
JuliaDiff/ForwardDiff.jl の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
Truncated discrete ccdf and logccdf return incorrect values at the lower atom対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
JuliaStats/Distributions.jl#2095 ·
-
documentation 📜 microphysics💧 ❄️
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
NumericalEarth/Breeze.jl#1073 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
CliMA/ClimaAtmos.jl#4891 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信