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