#####  [ cppreference.com ](/)

[ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fnumeric
"You are encouraged to log in; however, it is not mandatory \[o\]")

#####  Namespaces

  * [ Page ](/w/cpp/numeric "View the content page \[c\]")
  * [ Discussion ](/mwiki/index.php?title=Talk:cpp/numeric&action=edit&redlink=1 "Discussion about the content page \[t\]")

#####  Variants

#####  Views

  * [ View ](/w/cpp/numeric)
  * [ Edit ](/mwiki/index.php?title=cpp/numeric&action=edit "You can edit this page. Please use the preview button before saving \[e\]")
  * [ History ](/mwiki/index.php?title=cpp/numeric&action=history "Past revisions of this page \[h\]")

#####  Actions

#  Numerics library

From cppreference.com

< [ cpp ](/w/cpp "cpp")

[ C++ ](/w/cpp "cpp")

[ Compiler support ](/w/cpp/compiler_support "cpp/compiler support")  
---  
[ Freestanding and hosted ](/w/cpp/freestanding "cpp/freestanding")  
[ Language ](/w/cpp/language "cpp/language")  
[ Standard library ](/w/cpp/standard_library "cpp/standard library")  
[ Standard library headers ](/w/cpp/header "cpp/header")  
[ Named requirements ](/w/cpp/named_req "cpp/named req")  
[ Feature test macros ](/w/cpp/feature_test "cpp/feature test") (C++20)  
[ Language support library ](/w/cpp/utility#Language_support "cpp/utility")  
[ Concepts library ](/w/cpp/concepts "cpp/concepts") (C++20)  
[ Metaprogramming library ](/w/cpp/meta "cpp/meta") (C++11)  
[ Diagnostics library ](/w/cpp/error "cpp/error")  
[ General utilities library ](/w/cpp/utility "cpp/utility")  
[ Strings library ](/w/cpp/string "cpp/string")  
[ Containers library ](/w/cpp/container "cpp/container")  
[ Iterators library ](/w/cpp/iterator "cpp/iterator")  
[ Ranges library ](/w/cpp/ranges "cpp/ranges") (C++20)  
[ Algorithms library ](/w/cpp/algorithm "cpp/algorithm")  
**Numerics library**  
[ Localizations library ](/w/cpp/locale "cpp/locale")  
[ Input/output library ](/w/cpp/io "cpp/io")  
[ Filesystem library ](/w/cpp/filesystem "cpp/filesystem") (C++17)  
[ Regular expressions library ](/w/cpp/regex "cpp/regex") (C++11)  
[ Concurrency support library ](/w/cpp/thread "cpp/thread") (C++11)  
[ Technical specifications ](/w/cpp/experimental "cpp/experimental")  
[ Symbols index ](/w/cpp/symbol_index "cpp/symbol index")  
[ External libraries ](/w/cpp/links/libs "cpp/links/libs")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/navbar_content&action=edit)

**Numerics library**

[ Common mathematical functions ](/w/cpp/numeric/math "cpp/numeric/math")  
---  
[ Mathematical special functions ](/w/cpp/numeric/special_functions
"cpp/numeric/special functions") (C++17)  
[ Mathematical constants ](/w/cpp/numeric/constants "cpp/numeric/constants")
(C++20)  
[ Basic linear algebra algorithms ](/w/cpp/numeric/linalg
"cpp/numeric/linalg") (C++26)  
[ Floating-point environment ](/w/cpp/numeric/fenv "cpp/numeric/fenv") (C++11)  
[ Complex numbers ](/w/cpp/numeric/complex "cpp/numeric/complex")  
[ Numeric arrays ](/w/cpp/numeric/valarray "cpp/numeric/valarray")  
[ Pseudo-random number generation ](/w/cpp/numeric/random
"cpp/numeric/random")  
[ Factor operations ](/w/cpp/numeric#Factor_operations "cpp/numeric")  
[ gcd  ](/w/cpp/numeric/gcd "cpp/numeric/gcd") (C++17)  
[ lcm  ](/w/cpp/numeric/lcm "cpp/numeric/lcm") (C++17)  
[ Interpolations ](/w/cpp/numeric#Interpolation_operations "cpp/numeric")  
[ midpoint  ](/w/cpp/numeric/midpoint "cpp/numeric/midpoint") (C++20)  
[ lerp  ](/w/cpp/numeric/lerp "cpp/numeric/lerp") (C++20)  
[ Saturation arithmetic
](/w/cpp/numeric#Saturation_arithmetic_.28since_C.2B.2B26.29 "cpp/numeric")  
|  [ add_sat  ](/w/cpp/numeric/add_sat "cpp/numeric/add sat") (C++26)  
---  
[ sub_sat  ](/w/cpp/numeric/sub_sat "cpp/numeric/sub sat") (C++26)  
[ saturate_cast  ](/w/cpp/numeric/saturate_cast "cpp/numeric/saturate cast")
(C++26)  
  
|  [ mul_sat  ](/w/cpp/numeric/mul_sat "cpp/numeric/mul sat") (C++26)  
---  
[ div_sat  ](/w/cpp/num