3 <title>BOOST_PP_MUL
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_MUL
</b> macro expands to the product of its arguments.
12 <b>BOOST_PP_MUL
</b>(
<i>x
</i>,
<i>y
</i>)
18 The multiplicand of the operation.
19 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
23 The multiplier of the operation.
24 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
29 If the product of
<i>x
</i> and
<i>y
</i> is greater than
<b>BOOST_PP_LIMIT_MAG
</b>, the result is saturated to
<b>BOOST_PP_LIMIT_MAG
</b>.
32 Previously, this macro could not be used inside
<b>BOOST_PP_WHILE
</b>.
33 There is no longer any such restriction.
34 It is more efficient, however, to use
<b>BOOST_PP_MUL_D
</b> in such a situation.
37 This macro is the most efficient when
<i>x
</i> is greater than or equal to
<i>y
</i>.
38 However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.
39 In other words,
<i>x
</i> should be the value that is
<i>most likely
</i> to be the largest of the two operands.
43 <li><a href=
"limit_mag.html">BOOST_PP_LIMIT_MAG
</a></li>
44 <li><a href=
"mul_d.html">BOOST_PP_MUL_D
</a></li>
48 <b>Header:
</b> <a href=
"../headers/arithmetic/mul.html"><boost/preprocessor/arithmetic/mul.hpp
></a>
52 #include
<<a href=
"../headers/arithmetic/mul.html">boost/preprocessor/arithmetic/mul.hpp
</a>>
54 <a href=
"mul.html">BOOST_PP_MUL
</a>(
4,
4) // expands to
16
57 <div style=
"margin-left: 0px;">
58 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
59 </br><i>© Copyright Paul Mensonides
2002</i>
61 <div style=
"margin-left: 0px;">
62 <p><small>Distributed under the Boost Software License, Version
1.0. (See
63 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
65 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>