diff --git a/xml/System.Numerics/Complex.xml b/xml/System.Numerics/Complex.xml index dabce831640..1764baa24bb 100644 --- a/xml/System.Numerics/Complex.xml +++ b/xml/System.Numerics/Complex.xml @@ -1832,6 +1832,37 @@ + + + Adds a specified number to another specified number, where at least one of them is a complex number, and the other could be a double-precision real number. + + + operator allows performing addition operations that involve complex numbers. It enables code such as the following: + +[!code-csharp[System.Numerics.Complex.Add#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.add/cs/add3.cs#3)] +[!code-vb[System.Numerics.Complex.Add#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.add/vb/add3.vb#3)] + +If the addition results in an overflow in either the real or imaginary component, the value of that component is either or . + +Languages that do not support custom operators can call the equivalent group of methods instead. + +The operators that receive one double are more efficient than the operators that receive two Complex numbers. + +## Examples + +The following example illustrates addition with complex numbers: + +[!code-csharp[System.Numerics.Complex.Add#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.add/cs/add2.cs#2)] +[!code-vb[System.Numerics.Complex.Add#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.add/vb/add2.vb#2)] + + ]]> + + + @@ -1858,11 +1889,24 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The double-precision real value to add. + The complex value to add. + Adds a double-precision real number to a complex number. + The sum of and as a complex number. + + equivalent method instead. + + ]]> + + @@ -1891,11 +1935,24 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The complex value to add. + The double-precision real value to add. + Adds a complex number to a double-precision real number. + The sum of and as a complex number. + + equivalent method instead. + + ]]> + + @@ -1930,40 +1987,50 @@ - The first value to add. - The second value to add. + The first complex value to add. + The second complex value to add. Adds two complex numbers. The sum of and . - method defines the addition operation for complex numbers. It enables code such as the following: - - [!code-csharp[System.Numerics.Complex.Add#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.add/cs/add3.cs#3)] - [!code-vb[System.Numerics.Complex.Add#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.add/vb/add3.vb#3)] - - The addition of a complex number, a + bi, and a second complex number, c + di, takes the following form: - - (a + c) + (b + d)i - - If the method call results in an overflow in either the real or imaginary component, the value of that component is either or . - - Languages that do not support custom operators can call the method instead. - - The equivalent method for this operator is - -## Examples - The following example illustrates addition with complex numbers. - - [!code-csharp[System.Numerics.Complex.Add#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.add/cs/add2.cs#2)] - [!code-vb[System.Numerics.Complex.Add#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.add/vb/add2.vb#2)] - - ]]> + equivalent method instead. + + ]]> + + + Divides a specified number by another specified number, where at least one of them is a complex number, and the other could be a double-precision real number. + + + operator allows performing division operations that involve complex numbers. It enables code such as the following: + +[!code-csharp[System.Numerics.Complex.Divide#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.divide/cs/divide2.cs#2)] +[!code-vb[System.Numerics.Complex.Divide#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.divide/vb/divide2.vb#2)] + +If the division results in an overflow in either the real or imaginary component, the value of that component is either or . + +Languages that do not support custom operators and operator overloading can call the equivalent group of method instead. + +The operators that receive one double are more efficient than the operators that receive two Complex numbers. + + ]]> + + + @@ -1990,11 +2057,24 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The double-precision real value to be divided. + The complex value to divide by. + Divides a specified double-precision real number by a specified complex number. + The result of dividing by , as a complex number. + + 2 + d2)) + (ad / (c2 + d2)i + +Languages that do not support custom operators and operator overloading can call the equivalent method instead. + + ]]> + + @@ -2023,11 +2103,24 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The complex value to be divided. + The double-precision real value to divide by. + Divides a specified complex number by a specified double-precision real number. + The result of dividing by , as a complex number. + + 2) + (bc / c2)i + +Languages that do not support custom operators and operator overloading can call the equivalent method instead. + + ]]> + + @@ -2062,28 +2155,22 @@ - The value to be divided. - The value to divide by. + The complex value to be divided. + The complex value to divide by. Divides a specified complex number by another specified complex number. The result of dividing by . - method defines the division operation for complex numbers. It enables code such as the following: - - [!code-csharp[System.Numerics.Complex.Divide#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.divide/cs/divide2.cs#2)] - [!code-vb[System.Numerics.Complex.Divide#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.divide/vb/divide2.vb#2)] - - The division of a complex number, a + bi, and a second complex number, c + di, takes the following form: - - ((ac + bd) / (c2 + d2)) + ((bc - ad) / (c2 + d2)i - - If the division results in an overflow in either the real or imaginary component, the value of that component is either or . - - Languages that do not support custom operators and operator overloading can call the method instead. - - The equivalent method for this operator is ]]> + 2 + d2)) + ((bc - ad) / (c2 + d2)i + +Languages that do not support custom operators and operator overloading can call the equivalent method instead. + + ]]> @@ -2851,6 +2938,30 @@ This API is not CLS-compliant. + + + Multiplies a specified number by another specified number, where at least one of them is a complex number, and the other could be a double-precision real number. + + + operator allows performing multiplication operations that involve complex numbers. It enables code such as the following: + +[!code-csharp[System.Numerics.Complex.Multiply#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.multiply/cs/multiply2.cs#2)] +[!code-vb[System.Numerics.Complex.Multiply#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.multiply/vb/multiply2.vb#2)] + +If the multiplication results in an overflow in either the real or imaginary component, the value of that component is either or . + +Languages that do not support custom operators can call the equivalent group of methods instead. + +The operators that receive one double are more efficient than the operators that receive two Complex numbers. + + ]]> + + + @@ -2877,11 +2988,25 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The double-precision real value to multiply. + The complex value to multiply. + Multiplies a specified double-precision real number by a specified complex number. + The product of and , as a complex number. + + equivalent method instead. + + + ]]> + + @@ -2910,11 +3035,24 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The complex value to multiply. + The double-precision real value to multiply. + Multiplies the specified complex number by a specified double-precision real number. + The product of and , as a complex number. + + equivalent method instead. + + ]]> + + @@ -2949,32 +3087,50 @@ This API is not CLS-compliant. - The first value to multiply. - The second value to multiply. + The first complex value to multiply. + The second complex value to multiply. Multiplies two specified complex numbers. The product of and . - method defines the operation of the multiplication operator for complex numbers. It enables code such as the following: - - [!code-csharp[System.Numerics.Complex.Multiply#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.multiply/cs/multiply2.cs#2)] - [!code-vb[System.Numerics.Complex.Multiply#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.multiply/vb/multiply2.vb#2)] - - The multiplication of a complex number, a + bi, and a second complex number, c + di, takes the following form: - - (ac - bd) + (ad + bc)i - - If the multiplication results in an overflow in either the real or imaginary component, the value of that component is either or . - - Languages that do not support custom operators can call the method instead. - - The equivalent method for this operator is ]]> + equivalent method instead. + + ]]> + + + Subtracts a specified number from another specified number, where at least one of them is a complex number, and the other could be a double-precision real number. + + + operator allows performing subtraction operations that involve complex numbers. It enables code such as the following: + +[!code-csharp[System.Numerics.Complex.Subtract#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.subtract/cs/subtract2.cs#2)] +[!code-vb[System.Numerics.Complex.Subtract#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.subtract/vb/subtract2.vb#2)] + +If the subtraction results in an overflow in either the real or imaginary component, the value of that component is either or . + +Languages that do not support custom operators can call the equivalent group of methods instead. + +The operators that receive one double are more efficient than the operators that receive two Complex numbers. + + ]]> + + + @@ -3001,11 +3157,24 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The double-precision real value to subtract from (the minuend). + The complex value to subtract (the subtrahend). + Subtracts a complex number from a double-precision real number. + The result of subtracting from , as a complex number. + + method instead. + + ]]> + + @@ -3034,11 +3203,24 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The complex value to subtract from (the minuend). + The double-precision real value to subtract (the subtrahend). + Subtracts a double-precision real number from a complex number. + The result of subtracting from , as a complex number. + + method instead. + + ]]> + + @@ -3078,23 +3260,17 @@ This API is not CLS-compliant. Subtracts a complex number from another complex number. The result of subtracting from . - method defines the operation of the subtraction operator for complex numbers. It enables code such as the following: - - [!code-csharp[System.Numerics.Complex.Subtract#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.subtract/cs/subtract2.cs#2)] - [!code-vb[System.Numerics.Complex.Subtract#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.subtract/vb/subtract2.vb#2)] - - If the method call results in an overflow in either the real or imaginary component, the value of that component is either or . - - The subtraction of a complex number, c + di, from another complex number, a + bi, takes the following form: - - (a - c) + (b - d)i - - Languages that do not support custom operators can call the method instead. - - The equivalent method for this operator is ]]> + method instead. + + ]]> @@ -3572,6 +3748,34 @@ This API is not CLS-compliant. + + + Subtracts a specified number from another specified number, where at least one of them is a complex number, and the other could be a double-precision real number, and returns the result. + + + method allows subtraction operations that involve complex numbers. + +If the subtraction results in an overflow in either the real or imaginary component, the value of that component is either or . + +Languages that support custom operators can use the equivalent group of operators too. + +The methods that receive one double are more efficient than the method that receive two Complex numbers. + +## Examples + +The following example subtracts each complex number in an array from a complex number: + +[!code-csharp[System.Numerics.Complex.Subtract#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.subtract/cs/subtract1.cs#1)] +[!code-vb[System.Numerics.Complex.Subtract#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.subtract/vb/subtract1.vb#1)] + + ]]> + + + @@ -3598,11 +3802,24 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The double-precision real value to subtract from (the minuend). + The complex value to subtract (the subtrahend). + Subtracts one complex number from a double-precision real number and returns the result. + The result of subtracting from , as a complex number. + + equivalent operator too. + + ]]> + + @@ -3631,11 +3848,24 @@ This API is not CLS-compliant. - To be added. - To be added. - To be added. - To be added. - To be added. + The complex value to subtract from (the minuend). + The double-precision real value to subtract (the subtrahend). + Subtracts one double-precision real number from a complex number and returns the result. + The result of subtracting from , as a complex number. + + equivalent operator too. + + ]]> + + @@ -3680,26 +3910,17 @@ This API is not CLS-compliant. Subtracts one complex number from another and returns the result. The result of subtracting from . - or . - - Languages that do not support custom operators can use the method to perform subtraction using complex numbers. - - - -## Examples - The following example subtracts each complex number in an array from a complex number. - - [!code-csharp[System.Numerics.Complex.Subtract#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.numerics.complex.subtract/cs/subtract1.cs#1)] - [!code-vb[System.Numerics.Complex.Subtract#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.numerics.complex.subtract/vb/subtract1.vb#1)] - - ]]> + equivalent operator too. + + ]]> @@ -4123,4 +4344,4 @@ This API is not CLS-compliant. - \ No newline at end of file +