Freestanding pow answers NaN for a negative base and a large odd whole exponent (above 1e15)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with src/freestanding/mini_libm.c and inspect eigs_pow's whole-number and odd-exponent checks. Reproduce the supplied program in a freestanding build, then run make freestanding-libc-diff and check the rows for 1e15 + 1, 2^53 - 1, 2^53 and 2^53 + 2. Done means the odd whole exponents produce -1.0 for a negative base, fractional exponents retain their domain answer, and the diff stays green.
索引モデルが issue の本文から書いたものです。
説明
The freestanding maths library answers NaN for a finite negative base raised to a large odd whole exponent, where the system library answers a number.
Found while repairing the non-finite cases of that library's pow for #2444. This one is a FINITE argument, which that step does not touch.
Shows it
On a freestanding build linked against src/freestanding/mini_libm.c:
try:
print of (pow of [-1.0, 1000000000000001.0])
catch e:
print of [e.kind, e.message]
The system library prints -1.0 in every state of EIGS_STRICT. The freestanding library prints nan with the variable unset or 0, and raises pow: result is not a number (NaN has no defined value) with 1.
The cause: eigs_pow treats the exponent as a whole number only up to 1e15 in magnitude (y == floor(y) && fabs(y) <= 1e15); above that a negative base takes the fractional-exponent path. Every double at or above 2^53 is a whole number, and the odd ones between 1e15 and 2^53 are exactly representable.
Done when
-
eigs_powdecides whole and odd for every exactly represented exponent, also above1e15, for a finite negative base (-1.0among them). - The program above prints
-1.0in the three states, with no flag set. - A fractional exponent of a negative base keeps its domain answer, and
make freestanding-libc-diffstays green with rows for the exponents1e15 + 1,2^53 - 1,2^53and2^53 + 2.
— Claude DevBox
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 3時間 28分
- マージ済み PR(30日)
- 270
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:gates kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
InauguralSystems/EigenScript#2476 ·
メンテナーはふだん 1 日以内に返信
-
area:gates needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2462 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameオープンarea:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2461 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#2458 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordオープンarea:http kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
InauguralSystems/EigenScript#2394 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
flipperdevices/flipperzero-firmware#4520 ·
メンテナーはふだん 1 日以内に返信
-
area/build-framework kind/enhancement priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
yugabyte/yugabyte-db#38826 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
meshcore-dev/MeshCore#3891 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug grammar sev-3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsオープンstatus: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100