If a> 0, must 1 + A be greater than 1? In mathematics, the answer is yes. But on the computer, the answer is related to the size of a and the precision of the floating point number. Matalb can be used for the following calculation:
>> a=1/2^52a =
Float basic data type float's wrapper class float type object contains a float type of fieldIntroduction to Properties
The number of bits used to represent the float value in twos complement form
public static final int SIZE = 32;
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
Vaguely remember, floating point size seems to have a trap, because the bottom of the binary number can not accurately represent all the decimals. Sometimes there are things that make people feel strange.As in
This articleArticleIt is easy to understand, so let's take a look. You must have a clear understanding of the original code, reverse code, complement code, and transfer code of the computer principle. For more information, see ieee754. Otherwise,
1. Three important numerical representations (1) unsigned number, signed number, floating point
The original code, the inverse code, and the complement of a positive number are itself.
Negative number of the original code is its own,
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
1 representation of floating-point numbersIn general, we can use the following format to represent floating-point numbers
S
P
M
where S is the sign bit, p is the order, M is the mantissaFor IBM-PC, a
Report prototype: here we randomly select a two-dimensional report design analysis: the preceding report prototype has data items in rows and columns, we can design the coordinate point based on the geographical longitude and latitude. Here we use
1 representation of floating point numbers
Typically, we can use the following format to represent floating-point numbers
S
P
M
where S is the sign bit, p is the order, M is the mantissa
For IBM-PC, the
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.