Keywords: ISO C++ , library

Chapter 24. Numerics
Prev | Part III. Extensions | Next

## Chapter 24. Numerics

26.4, the generalized numeric operations such as accumulate, are extended with the following functions:

       power (x, n);
       power (x, n, moniod_operation);

Returns, in FORTRAN syntax, "x ** n" where n>=0. In the case of n == 0, returns the identity element for the monoid operation. The two-argument signature uses multiplication (for a true "power" implementation), but addition is supported as well. The operation functor must be associative.

The `iota` function wins the award for Extension With the Coolest Name. It "assigns sequentially increasing values to a range. That is, it assigns value to *first, value + 1 to *(first + 1) and so on." Quoted from SGI documentation.

       void iota(_ForwardIter first, _ForwardIter last, _Tp value);

Prev | Up | Next
Chapter 23. Algorithms | Home | Chapter 25. Iterators