<?xml version="1.0"?>
<clause number="14.7.1" title="Multiplication operator">
  <paragraph>For an operation of the form x * y, binary operator overload resolution (<hyperlink>14.2.4</hyperlink>) is applied to select a specific operator implementation. The operands are converted to the parameter types of the selected operator, and the type of the result is the return type of the operator. </paragraph>
  <paragraph>The predefined multiplication operators are listed below. The operators all compute the product of x and y. <list><list_item> Integer multiplication: <code_example><![CDATA[
int operator *(int x, int y);  
uint operator *(uint x, uint y);  
long operator *(long x, long y);  
ulong operator *(ulong x, ulong y);  
]]></code_example>In a checked context, if the product is outside the range of the result type, a System.OverflowException is thrown. In an unchecked context, overflows are not reported and any significant high-order bits outside the range of the result type are discarded. </list_item><list_item> Floating-point multiplication: <code_example><![CDATA[
float operator *(float x, float y);  
double operator *(double x, double y);  
]]></code_example>The product is computed according to the rules of IEEE 754 arithmetic. The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. In the table, x and y are positive finite values. z is the result of x * y. If the result is too large for the destination type, z is infinity. If the result is too small for the destination type, z is zero. <table_line>+y <unicode>150</unicode>y +0 <unicode>150</unicode>0 +<infinity/> <unicode>150</unicode><infinity/> NaN </table_line>
<table_line>+x +z <unicode>150</unicode>z +0 <unicode>150</unicode>0 +<infinity/> <unicode>150</unicode><infinity/> NaN </table_line>
<table_line><unicode>150</unicode>x <unicode>150</unicode>z +z <unicode>150</unicode>0 +0 <unicode>150</unicode><infinity/> +<infinity/> NaN </table_line>
<table_line>+0 +0 <unicode>150</unicode>0 +0 <unicode>150</unicode>0 NaN NaN NaN </table_line>
<table_line><unicode>150</unicode>0 <unicode>150</unicode>0 +0 <unicode>150</unicode>0 +0 NaN NaN NaN </table_line>
<table_line>+<infinity/> +<infinity/> <unicode>150</unicode><infinity/> NaN NaN +<infinity/> <unicode>150</unicode><infinity/> NaN </table_line>
<table_line><unicode>150</unicode><infinity/><unicode>150</unicode><infinity/> +<infinity/> NaN NaN <unicode>150</unicode><infinity/> +<infinity/> NaN </table_line>
<table_line>NaN NaN NaN NaN NaN NaN NaN NaN </table_line>
</list_item><list_item> Decimal multiplication: <code_example><![CDATA[
decimal operator *(decimal x, decimal y);  
]]></code_example>If the resulting value is too large to represent in the <keyword>decimal</keyword> format, a System.OverflowException is thrown. If the result value is too small to represent in the <keyword>decimal</keyword> format, the result is zero. The scale of the result, before any rounding, is the sum of the scales of the two operands. Decimal multiplication is equivalent to using the multiplication operator of type System.Decimal. </list_item></list></paragraph>
</clause>
