[valarray.binary] # 29 Numerics library [[numerics]](./#numerics) ## 29.6 Numeric arrays [[numarray]](numarray#valarray.binary) ### 29.6.3 valarray non-member operations [[valarray.nonmembers]](valarray.nonmembers#valarray.binary) #### 29.6.3.1 Binary operators [valarray.binary] [🔗](#lib:operator*,valarray) `template valarray operator* (const valarray&, const valarray&); template valarray operator/ (const valarray&, const valarray&); template valarray operator% (const valarray&, const valarray&); template valarray operator+ (const valarray&, const valarray&); template valarray operator- (const valarray&, const valarray&); template valarray operator^ (const valarray&, const valarray&); template valarray operator& (const valarray&, const valarray&); template valarray operator| (const valarray&, const valarray&); template valarray operator<<(const valarray&, const valarray&); template valarray operator>>(const valarray&, const valarray&); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8119) *Mandates*: The indicated operator can be applied to operands of type T and returns a value of type T or which can be unambiguously implicitly converted to T[.](#1.sentence-1) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8125) *Preconditions*: The argument arrays have the same length[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8129) *Returns*: A valarray whose length is equal to the lengths of the argument arrays[.](#3.sentence-1) Each element of the returned array is initialized with the result of applying the indicated operator to the corresponding elements of the argument arrays[.](#3.sentence-2) [🔗](#lib:operator*,valarray_) `template valarray operator* (const valarray&, const typename valarray::value_type&); template valarray operator* (const typename valarray::value_type&, const valarray&); template valarray operator/ (const valarray&, const typename valarray::value_type&); template valarray operator/ (const typename valarray::value_type&, const valarray&); template valarray operator% (const valarray&, const typename valarray::value_type&); template valarray operator% (const typename valarray::value_type&, const valarray&); template valarray operator+ (const valarray&, const typename valarray::value_type&); template valarray operator+ (const typename valarray::value_type&, const valarray&); template valarray operator- (const valarray&, const typename valarray::value_type&); template valarray operator- (const typename valarray::value_type&, const valarray&); template valarray operator^ (const valarray&, const typename valarray::value_type&); template valarray operator^ (const typename valarray::value_type&, const valarray&); template valarray operator& (const valarray&, const typename valarray::value_type&); template valarray operator& (const typename valarray::value_type&, const valarray&); template valarray operator| (const valarray&, const typename valarray::value_type&); template valarray operator| (const typename valarray::value_type&, const valarray&); template valarray operator<<(const valarray&, const typename valarray::value_type&); template valarray operator<<(const typename valarray::value_type&, const valarray&); template valarray operator>>(const valarray&, const typename valarray::value_type&); template valarray operator>>(const typename valarray::value_type&, const valarray&); ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8192) *Mandates*: The indicated operator can be applied to operands of type T and returns a value of type T or which can be unambiguously implicitly converted to T[.](#4.sentence-1) [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L8198) *Returns*: A valarray whose length is equal to the length of the array argument[.](#5.sentence-1) Each element of the returned array is initialized with the result of applying the indicated operator to the corresponding element of the array argument and the non-array argument[.](#5.sentence-2)