• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <cmath>

    std::comp_ellint_2

    namespace std {
      double
        comp_ellint_2(double k);              // (1) C++17
      floating-point-type
        comp_ellint_2(floating-point-type k); // (1) C++23
    
      Promoted
        comp_ellint_2(Arithmetic k);          // (2) C++17
    
      float
        comp_ellint_2f(float k);              // (3) C++17
    
      long double
        comp_ellint_2l(long double k);        // (4) C++17
    }
    

    概要

    第2種完全楕円積分 (complete elliptic integral of the second kind) を計算する。

    戻り値

    引数 k の第2種完全楕円積分 E(k)=E(k,π/2)=0π/2dθ 1k2sin2θfor |k|1 を返す。 E(k,ϕ) は第2種不完全楕円積分 (ellint_2)。

    備考

    #include <cmath>
    #include <iostream>
    
    int main() {
      std::cout << "comp_ellint_2(0)   = " << std::comp_ellint_2(0) << "\n";    // π / 2
      std::cout << "comp_ellint_2(0.5) = " << std::comp_ellint_2(0.5) << "\n";  // 1.46746
      std::cout << "comp_ellint_2(1)   = " << std::comp_ellint_2(1) << "\n";    // 1
    }
    

    出力例

    comp_ellint_2(0)   = 1.5708
    comp_ellint_2(0.5) = 1.46746
    comp_ellint_2(1)   = 1
    

    バージョン

    言語

    • C++17

    処理系

    実装例

    級数

    E(k)=π2n=012n1[(2n1)!!(2n)!!]2k2n

    関連項目

    参照