Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the data type of integer?
What is the data type of integer?
Integer is the basic data type.

Integer uses integer data to store integers, including positive integers, negative integers and zeros. Integer constants are expressed as decimal integers. For example, 199 1, 0,-123 are all integer constants. While 52.0 or 13 1.4 are not integer constants.

Integer? Variables are stored in the length closest to the compilation environment, and the length of integer data and its range of values are not fixed, which is affected by the compilation environment. When this type declaration is made in different programming languages, the specific implementation may also be different.

Javascript, all numbers are saved as 64 floating-point numbers, which determines that the precision of integers can only reach 53-bit binary. For integers larger than this range, JavaScript cannot be accurately represented, which makes JavaScript not suitable for scientific calculation and financial calculation.

Now it is suggested to introduce a new data type integer to solve this problem. Integer data is only used to represent integers, and there is no limit to the number of digits. An integer that can accurately represent any number of digits. In order to distinguish it from numerical type, data of integer type must be represented by suffix n.