int operator /(int x, int y); uint operator /(uint x, uint y); long operator /(long x, long y); ulong operator /(ulong x, ulong y);4 If the value of the right operand is zero, a System.DivideByZeroException is thrown. 5 The division rounds the result towards zero, and the absolute value of the result is the largest possible integer that is less than the absolute value of the quotient of the two operands. 6 The result is zero or positive when the two operands have the same sign and zero or negative when the two operands have opposite signs. 7 If the left operand is the maximum negative int or long value and the right operand is -1, an overflow occurs. 8 In a checked context, this causes a System.OverflowException to be thrown. 9 In an unchecked context, the overflow is not reported and the result is instead the value of the left operand.
float operator /(float x, float y); double operator /(double x, double y);11 The quotient is computed according to the rules of IEEE 754 arithmetic. 12 The following table lists the results of all possible combinations of nonzero finite values, zeros, infinities, and NaN's. 13 In the table, x and y are positive finite values. z is the result of x / y. 14 If the result is too large for the destination type, z is infinity. 15 If the result is too small for the destination type, z is zero.
/ | +y | -y | +0 | -0 | +∞ | -∞ | NaN |
---|---|---|---|---|---|---|---|
+x | +z | -z | +∞ | -∞ | +0 | -0 | NaN |
-x | -z | +z | -∞ | +∞ | -0 | +0 | NaN |
+0 | +0 | -0 | NaN | NaN | +0 | -0 | NaN |
-0 | -0 | +0 | NaN | NaN | -0 | +0 | NaN |
+∞ | +∞ | -∞ | +∞ | -∞ | NaN | NaN | NaN |
-∞ | -∞ | +∞ | -∞ | +∞ | NaN | NaN | NaN |
NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
decimal operator /(decimal x, decimal y);17 If the value of the right operand is zero, a System.DivideByZeroException is thrown. 18 If the resulting value is too large to represent in the decimal format, a System.OverflowException is thrown. 19 If the result value is too small to represent in the decimal format, the result is zero. 20 The scale of the result, before any rounding, is the smallest scale that will preserve a result equal to the exact result. 21 Decimal division is equivalent to using the division operator of type System.Decimal.
| |
Jagger Software Ltd | |
Company # 4070126 | |
VAT # 762 5213 42 |