hypergeometric_0F1 loses about 20 ulps for b = 1.5 and −10 < z < 0
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #1618 @NAThompson による — マージ済み
評価
調査の方向性
Start with boost/math/special_functions/hypergeometric_0F1.hpp, which the reproducer includes, and compare the Taylor series branch (-5 <= z < 0) with the Bessel relation branch (z < -5). Build the reproducer, print the three listed values, and check them against sin(2√−z)/(2√−z). Done means the error on -10 < z < 0 falls under the ulp bounds the report gives for other ranges. Expect numerical analysis work, not a one-line edit.
索引モデルが issue の本文から書いたものです。
説明
For b = 3/2 and z < 0, 0F1(; 3/2; z) = sin(2√−z) / (2√−z), so the correct values are easy to check:
#include <boost/math/special_functions/hypergeometric_0F1.hpp>
#include <cstdio>
int main()
{
for (double z : {-3.1499999999999986, -4.5625, -6.0})
{
std::printf("%.17g\n", boost::math::hypergeometric_0F1(1.5, z));
}
}
| z | Boost | correctly rounded | error | condition number |z f′/f| |
|---|---|---|---|---|
| −3.1499999999999986 | −0.11179277162022014 | −0.11179277162022051 | +27.2 ulps | 3.6 |
| −4.5625 | −0.21174773278219308 | −0.2117477327821936 | +19.2 ulps | 0.51 |
| −6 | −0.20058104804562102 | −0.20058104804562038 | −23.4 ulps | 0.96 |
Over 2001 points on [−20, 5], at points with condition number below 4 the error is under 3.5 ulps for z > 0 and under 7.2 ulps for z < −10, but up to 27.2 ulps on −10 < z < 0. Both branches used there show it: the Taylor series (−5 ≤ z < 0) and the Bessel relation (z < −5). Same function as #1538, which #1547 closed.
Apple clang -O2 on arm64 at develop b8c1f01dd; an Emscripten (WebAssembly) build gives the same errors.
- 主要言語
- C++
- スター
- 378
- フォーク
- 271
- 平均マージ
- 12時間 37分
- マージ済み PR(30日)
- 66
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/math のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
Reverse-mode autodiff: order-2 tape slows order-1 gradients, rewound tapes keep allocating blocks, rvar copies silently share a node対応中かも @NAThompson が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
Feature Wishlistオープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
boostorg/math#303 · コメント 20 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
[XLA] hlo/pass/README.md says passes implement Run; since the NVI change they implement RunImplオープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NVIDIA-RTX/NRI#312 ·
メンテナーはふだん 1 日以内に返信
-
permute_q_b_proj / permute_wv_proj accept scale factors from another device対応中かも @0z5a が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepseek-ai/FlashMLA#247 ·
メンテナーはふだん 1 日以内に返信
-
Linux npm packaging leaves workspace files that block subsequent CI checkout対応中かも @Spockkk0225 が今日担当しました。 オープンci
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
alibaba/neug#1195 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信