namespace std::simd {
template<math-floating-point V>
deduced-vec-t<V> cyl_neumann(const V& nu, const V& x); // (1) C++26
template<math-floating-point V>
deduced-vec-t<V> cyl_neumann(const deduced-vec-t<V>& nu, const V& x); // (2) C++26
template<math-floating-point V>
deduced-vec-t<V> cyl_neumann(const V& nu, const deduced-vec-t<V>& x); // (3) C++26
}
概要
浮動小数点要素型のbasic_vec(またはスカラーの浮動小数点数)について、各要素に<cmath>のcyl_neumannを適用し、各要素を階数nu・引数xとする第二種ベッセル関数(ノイマン関数)の値を求める。
制約math-floating-pointは、Vが浮動小数点要素型のbasic_vec、またはスカラーの浮動小数点型であることを表す説明専用のコンセプトである。deduced-vec-t<V>は、Vに対応するデータ並列型(Vがスカラーの場合は既定のABIをもつbasic_vec)である。
戻り値
各要素i(0以上deduced-vec-t<V>::size()未満)について、nu[i]とx[i]に<cmath>のcyl_neumannを適用した結果で要素ごとに初期化されたbasic_vecオブジェクトを返す。
ある要素iについて定義域エラー・極エラー・値域エラーが発生する場合、その要素の値は未規定である。
備考
例
#include <simd>
#include <print>
namespace simd = std::simd;
int main()
{
simd::vec<double, 2> nu = 0.0; // {0, 0}
simd::vec<double, 2> x([](int i) { return i + 1.0; }); // {1, 2}
// 各要素を階数・引数とする第二種ベッセル関数を求める
simd::vec<double, 2> r = simd::cyl_neumann(nu, x);
for (std::size_t i = 0; i < r.size(); ++i) {
std::print("{} ", r[i]);
}
std::println("");
}
出力例
0.08825696421567697 0.5103756726497451
バージョン
言語
- C++26
処理系
- Clang: 22 ❌
- GCC: 16.1 ❌
- Visual C++: 2026 Update 2 ❌