meric/math/sqrt") , and  [ std::sin ](/w/cpp/numeric/math/sin
"cpp/numeric/math/sin") .

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=3 "Edit
section: Mathematical special functions \(since C++17\)") ]  [ Mathematical
special functions ](/w/cpp/numeric/special_functions "cpp/numeric/special
functions") (since C++17)

The header [ ` <cmath> ` ](/w/cpp/header/cmath "cpp/header/cmath") also
provides several mathematical special functions such as  [ std::beta
](/w/cpp/numeric/special_functions/beta "cpp/numeric/special functions/beta")
,  [ std::hermite ](/w/cpp/numeric/special_functions/hermite
"cpp/numeric/special functions/hermite") , and  [ std::cyl_bessel_i
](/w/cpp/numeric/special_functions/cyl_bessel_i "cpp/numeric/special
functions/cyl bessel i") .

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=4 "Edit
section: Mathematical constants \(since C++20\)") ]  [ Mathematical constants
](/w/cpp/numeric/constants "cpp/numeric/constants") (since C++20)

The header [ ` <numbers> ` ](/w/cpp/header/numbers "cpp/header/numbers")
provides several mathematical constants, such as  [ std::numbers::pi
](/w/cpp/numeric/constants "cpp/numeric/constants") or  [ std::numbers::sqrt2
](/w/cpp/numeric/constants "cpp/numeric/constants")

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=5 "Edit
section: Basic linear algebra algorithms \(since C++26\)") ]  [ Basic linear
algebra algorithms ](/w/cpp/numeric/linalg "cpp/numeric/linalg") (since C++26)

The header [ ` <linalg> ` ](/w/cpp/header/linalg "cpp/header/linalg") provides
basic linear algebra algorithms which are based on BLAS.

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=6 "Edit
section: Complex number arithmetic") ]  Complex number arithmetic

Defined in header ` [ <complex> ](/w/cpp/header/complex "cpp/header/complex")
`  
---  
[ complex  ](/w/cpp/numeric/complex "cpp/numeric/complex") |  a complex number type   
(class template)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=7 "Edit
section: Numeric arrays") ]  Numeric arrays

Defined in header ` [ <valarray> ](/w/cpp/header/valarray
"cpp/header/valarray") `  
---  
[ valarray  ](/w/cpp/numeric/valarray "cpp/numeric/valarray") |  numeric arrays, array masks and array slices   
(class template)  
  
##  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=8 "Edit
section: Numeric algorithms") ]  Numeric algorithms

The header [ ` <numeric> ` ](/w/cpp/header/numeric "cpp/header/numeric")
provides numeric algorithms below:

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=9 "Edit
section: Factor operations") ]  Factor operations

Defined in header ` [ <numeric> ](/w/cpp/header/numeric "cpp/header/numeric")
`  
---  
[ gcd  ](/w/cpp/numeric/gcd "cpp/numeric/gcd") (C++17)  |  computes the greatest common divisor of two integers   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/dsc_gcd&action=edit)  
[ lcm  ](/w/cpp/numeric/lcm "cpp/numeric/lcm") (C++17)  |  computes the least common multiple of two integers   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/dsc_lcm&action=edit)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=10
"Edit section: Interpolation operations") ]  Interpolation operations

Defined in header ` [ <numeric> ](/w/cpp/header/numeric "cpp/header/numeric")
`  
---  
[ midpoint  ](/w/cpp/numeric/midpoint "cpp/numeric/midpoint") (C++20)  |  midpoint between two numbers or pointers   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/dsc_midpoint&action=edit)  
Defined in header ` [ <cmath> ](/w/cpp/header/cmath "cpp/header/cmath") `  
[ lerp  ](/w/cpp/numeric/lerp "cpp/numeric/lerp") (C++20)  |  linear interpolation function   
(function)  [ [edit]
](https://en.cppreference.com/mw