[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_partial_sum&action=edit)  
[ inclusive_scan  ](/w/cpp/algorithm/inclusive_scan "cpp/algorithm/inclusive scan") (C++17)  |  similar to  [ std::partial_sum ](/w/cpp/algorithm/partial_sum "cpp/algorithm/partial sum") , includes the  i  th  input element in the  i  th  sum   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_inclusive_scan&action=edit)  
[ exclusive_scan  ](/w/cpp/algorithm/exclusive_scan "cpp/algorithm/exclusive scan") (C++17)  |  similar to  [ std::partial_sum ](/w/cpp/algorithm/partial_sum "cpp/algorithm/partial sum") , excludes the  i  th  input element from the  i  th  sum   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_exclusive_scan&action=edit)  
[ transform_inclusive_scan  ](/w/cpp/algorithm/transform_inclusive_scan "cpp/algorithm/transform inclusive scan") (C++17)  |  applies an invocable, then calculates inclusive scan   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_transform_inclusive_scan&action=edit)  
[ transform_exclusive_scan  ](/w/cpp/algorithm/transform_exclusive_scan "cpp/algorithm/transform exclusive scan") (C++17)  |  applies an invocable, then calculates exclusive scan   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_transform_exclusive_scan&action=edit)  
  
##  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=13 "Edit
section: Miscellanous") ]  Miscellanous

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=14
"Edit section: Pseudo-random number generation") ]  [ Pseudo-random number
generation ](/w/cpp/numeric/random "cpp/numeric/random")

The header [ ` <random> ` ](/w/cpp/header/random "cpp/header/random") defines
[ pseudo-random number generators and numerical distributions
](/w/cpp/numeric/random "cpp/numeric/random") . The header [ ` <cstdlib> `
](/w/cpp/header/cstdlib "cpp/header/cstdlib") also includes C-style random
number generation via  [ std::srand ](/w/cpp/numeric/random/srand
"cpp/numeric/random/srand") and  [ std::rand ](/w/cpp/numeric/random/rand
"cpp/numeric/random/rand") .

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=15
"Edit section: Floating-point environment \(since C++11\)") ]  [ Floating-
point environment ](/w/cpp/numeric/fenv "cpp/numeric/fenv") (since C++11)

The header [ ` <cfenv> ` ](/w/cpp/header/cfenv "cpp/header/cfenv") defines [
flags and functions related to exceptional floating-point state
](/w/cpp/numeric/fenv "cpp/numeric/fenv") , such as overflow and division by
zero.

###  [ [ edit ](/mwiki/index.php?title=cpp/numeric&action=edit&section=16
"Edit section: Bit manipulation \(since C++20\)") ]  Bit manipulation  (since
C++20)

The header [ ` <bit> ` ](/w/cpp/header/bit "cpp/header/bit") provides several
function templates to access, manipulate, and process individual bits and bit
sequences.

Defined in header ` [ <bit> ](/w/cpp/header/bit "cpp/header/bit") `  
---  
Defined in namespace ` std `  
[ bit_cast  ](/w/cpp/numeric/bit_cast "cpp/numeric/bit cast") (C++20)  |  reinterpret the object representation of one type as that of another   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/dsc_bit_cast&action=edit)  
[ byteswap  ](/w/cpp/numeric/byteswap "cpp/numeric/byteswap") (C++23)  |  reverses the bytes in the given integer value   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/dsc_byteswap&action=edit)  
[ has_single_bit  ](/w/cpp/numeric/has_single_bit "cpp/numeric/has single bit") (C++20)  |  checks if a number is an integral power of  2    
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/numeric/d