標準ライブラリヘッダ <numbers>
提供: cppreference.com
このヘッダは数値演算ライブラリの一部です。
[編集]数学定数(C++20以上)
ヘッダ <numbers> は std::pi や std::sqrt2 などのいくつかの数学定数を提供します。
[編集] 概要
namespace std::numbers{template<class T>inlineconstexpr T e_v =/* unspecified */;template<class T>inlineconstexpr T log2e_v =/* unspecified */;template<class T>inlineconstexpr T log10e_v =/* unspecified */;template<class T>inlineconstexpr T pi_v =/* unspecified */;template<class T>inlineconstexpr T inv_pi_v =/* unspecified */;template<class T>inlineconstexpr T inv_sqrtpi_v =/* unspecified */;template<class T>inlineconstexpr T ln2_v =/* unspecified */;template<class T>inlineconstexpr T ln10_v =/* unspecified */;template<class T>inlineconstexpr T sqrt2_v =/* unspecified */;template<class T>inlineconstexpr T sqrt3_v =/* unspecified */;template<class T>inlineconstexpr T inv_sqrt3_v =/* unspecified */;template<class T>inlineconstexpr T egamma_v =/* unspecified */;template<class T>inlineconstexpr T phi_v =/* unspecified */; template<floating_point T>inlineconstexpr T e_v<T>=/* see description */;template<floating_point T>inlineconstexpr T log2e_v<T>=/* see description */;template<floating_point T>inlineconstexpr T log10e_v<T>=/* see description */;template<floating_point T>inlineconstexpr T pi_v<T>=/* see description */;template<floating_point T>inlineconstexpr T inv_pi_v<T>=/* see description */;template<floating_point T>inlineconstexpr T inv_sqrtpi_v<T>=/* see description */;template<floating_point T>inlineconstexpr T ln2_v<T>=/* see description */;template<floating_point T>inlineconstexpr T ln10_v<T>=/* see description */;template<floating_point T>inlineconstexpr T sqrt2_v<T>=/* see description */;template<floating_point T>inlineconstexpr T sqrt3_v<T>=/* see description */;template<floating_point T>inlineconstexpr T inv_sqrt3_v<T>=/* see description */;template<floating_point T>inlineconstexpr T egamma_v<T>=/* see description */;template<floating_point T>inlineconstexpr T phi_v<T>=/* see description */; inlineconstexprdouble e = e_v<double>;inlineconstexprdouble log2e = log2e_v<double>;inlineconstexprdouble log10e = log10e_v<double>;inlineconstexprdouble pi = pi_v<double>;inlineconstexprdouble inv_pi = inv_pi_v<double>;inlineconstexprdouble inv_sqrtpi = inv_sqrtpi_v<double>;inlineconstexprdouble ln2 = ln2_v<double>;inlineconstexprdouble ln10 = ln10_v<double>;inlineconstexprdouble sqrt2 = sqrt2_v<double>;inlineconstexprdouble sqrt3 = sqrt3_v<double>;inlineconstexprdouble inv_sqrt3 = inv_sqrt3_v<double>;inlineconstexprdouble egamma = egamma_v<double>;inlineconstexprdouble phi = phi_v<double>;}