Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What is the operation result of single precision and long integer data and why?
What is the operation result of single precision and long integer data and why?
If it is only an operation, the result is single precision. If a variable is assigned a value through an expression, the result will be converted to the data type of the variable.

There are two ways to convert between different data types: implicit conversion and explicit conversion.

Implicit conversion refers to some conversion formulas made by default, such as the mixed operation of plastic and real type (the operation I am talking about here is legal, and it will not require data type to do operand operation like remainder), and the result is that the data type with low precision or low digits is automatically converted to high data type, that is, the result obtained from the above problems is real type.

Display conversion: refers to the forced result type conversion by using the forced type conversion operator, which is a method to artificially obtain the required type.

When the data of different data types described are operated, implicit conversion is adopted, and the result is a single precision number.