TAILIEUCHUNG - C Language Reference Manual_5

Các toán hạng được chuyển đổi sang các loại tham số của các nhà điều hành được lựa chọn, và các loại kết quả là kiểu trả về của người điều khiển. Ngoài ra các nhà khai thác được xác định trước được liệt kê dưới đây. | Chapter 7 Expressions y -y 0 -0 w -W NaN x z z NaN NaN x x NaN -x -z -z NaN NaN -x -x NaN 0 0 0 NaN NaN 0 0 NaN -0 -0 -0 NaN NaN -0 -0 NaN w NaN NaN NaN NaN NaN NaN NaN -W NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN Decimal remainder decimal operator decimal x decimal y If the value of the right operand is zero a DivideByZeroException is thrown. If the resulting value is too large to represent in the decimal format an OverflowException is thrown. If the result value is too small to represent in the decimal format the result is zero. Addition operator For an operation of the form x y binary operator overload resolution 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. The predefined addition operators are listed below. For numeric and enumeration types the predefined addition operators compute the sum of the two operands. When one or both operands are of type string the predefined addition operators concatenate the string representation of the operands. Integer addition int operator int x int y uint operator uint x uint y long operator long x long y ulong operator ulong x ulong y In a checked context if the sum is outside the range of the result type an OverflowException is thrown. In an unchecked context overflows are not reported and any significant high-order bits of the result are discarded. Floating-point addition float operator float x float y double operator double x double y The sum 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 nonzero finite values and z is the result of x y. If x and y have the same magnitude but opposite signs z is positive zero. If x y is too large to represent in the destination type z is an infinity with the .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.