1. ScopeThe float and double ranges are determined by the number of digits of the index.The float index has eight digits, while the double index has 11 digits. The distribution is as follows:Float:1bit (symbol bit) 8 bits (index bit) 23 bits (tail
double and float are floating point types. Doubles (double type) are more accurate than float (single-precision) data and occupy more space. Double precision is twice times that of float, so a double is often used for more precise calculations.
Single-precision floating-point numbers are 4 bytes (32bit) representing floating point numbersUses the IEEE754 standard computer floating-point number, in the interior is uses the binary system to representFor example: 7.22 with a 32-bit binary is
IEEE754 the representation of floating-point numbers. The expression range of float type data in C language is -3.4*10^38~+3.4*10^38. Double is -1.7*10^-308~1.7*10^308,long double for -1.2*10^-4932~1.2*10^4932.
Type
Number of bits
Eight basic types of Java:六种数字类型(四个整数型,两个浮点型),一种字符类型,一种布尔型。Details such as the following1、整数:包含int,short,byte,long 2、浮点型:float,double 3、字符:char 4、布尔:booleanThe corresponding space and range such as the following
Basic Type
Number
Why is a long type smaller than the range of float types? 2015-09-15 22:36 680 People read Comments (0) favorite reports Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.As a common sense,
Original URL: http://blog.sina.com.cn/s/blog_827d041701017ctm.htmlQuestions raised: 12.0f-11.9f=0.10000038, "Lose The Endless" why?An explanation from MSDN:Http://msdn.microsoft.com/zh-cn/c151dt3s.aspxWhy floating-point numbers may lose precision
A problem occurs when a program running properly on a 32-bit machine fails on a 64-bit machine. So I found this article about transplantation and took a good look.
Original post address: http://queniao.blog.51cto.com/10636/126564
In fact, there is
This article analyzes the usage differences between floating-point (float) and integer (integer) data types in PHP and, in that case, insufficient data lengths.
The value can only be true or false, and when other types are converted to Boolean, the
This article analyzes the differences between float and integer data types in php and the insufficient data length in that case. The value can only be True or False. when other types are converted to the boolean type, the following values are
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.