In ax, the base types of the edt type of the quantity and amount are both real. Although the EDT type is created, the selection is real, which is actually called decimal, because this type of EDT is translated into the numbric type in SQL Server,
Simple IntroductionWhen writing a data platform, it is necessary to make the statistic of passing rate, so it is unavoidable to have decimal condition. At this point, there will be an infinite number of decimals, then how to make a choice?Actual
I ran into a problem today when I wrote the program. about how to control floating-point numbers only two digits after the decimal point, the normal idea is to use the round function, such as round (A, 2), but in the face of the following problems
Xcart the number of decimal places by default is 2 bits, sometimes need to change the number of bits as needed; At first, the number of bits in the data type in the database can be changed, and the result is that Xcart is limited in the program,
It's always strange why a decimal is added to the pre-defined data type of C #. Isn't float and double enough? I am going to dig it out today.
Floating Point Type
Name
CTS Type
De script ion
Significant Figures
Range
We all know that in the program language and the database of various numeric types decimal,numeric,float,double,real ..., sometimes inadvertently will be a problem, in addition to mastering the basic principles of data storage, but also to carefully
It's been weird. Why is a decimal added to the predefined data types of C #, and is it enough to have float and double? Come and dig a hole today.
Floating-point type
Name
CTS Type
De script ion
Significant figures
Range
Transferred from: http://www.cnblogs.com/lovewife/articles/2466543.htmlSingle precision refers to a 4-byte floating-point number, which is the floatA double is a 8-byte floating-point number, which is doubleDecimal is a high precisionFloating point
Decimal (numeric) synonymous with the exact storage of numeric values.
The decimal data type can store up to 38 digits, and all numbers can be placed to the right of the decimal point. The decimal data type stores an accurate (accurate) numeric
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.