It just throws the decimal point away and that's because, again, these are ints and the answer intuitively should be a floating point value, but I need to be more specific.
它直接把小数点后面的数值丢弃掉了,因为,凭直觉,那些整型数和结果应该是一个浮点数据,但是我需要一个更精确的数值。
There's no decimal point; there's no point zero; there's no floating point value, it's just a hardcoded integer.
这里没有小数点,这里没有;,这里没有浮点数值,它只是一个整型数字。
When you think about an int or a float or a dictionary or a list, you knew that there were functions that operated on them.
当你想到整型,浮点型,或者链表时,你知道可以用函数去处理他们,但是当你传递一个参数,例如链表。
Here I actually need to tell the computer, "Give me some bytes in ram in which to store a value, and that value's going to be a floating point value."
这里我的确需要告诉计算机,“给我一些字节内存,来存储一个值,那个值将是,浮点型的数值“
And I can fix this just by changing one of those values to a floating point.
所以我可以通过改变其中一个,整型数为浮点数。
So a floating point value again is a number with a decimal point, so it depends.
一个浮点型数据就是一个,带小数点的数。
Then I'd be multiplying a float by 5, so that's a float times an int.
然后我们把这个浮点数乘以,那是浮点数乘以整型数。
But you'd like to write your program not in terms of floats and ints and lists, but in terms of mortgages, and CDOs, and all of the objects that you read about in the paper, the types you read about.
但是你可以不基于,浮点型,整型还有链表来进行编程,而是基于一些房贷类,债务抵押债券类来编程,甚至那些你在报纸上看到的类。
So, a 32 bit of float gives you a bunch of precision.
2比特的浮点型数据精度更大。
Instead divide an int by a floating point value.
我们用一个整型数除以浮点数。
GetFloating-- GetFloating-- GetFloat for a floating point number.
还有-,得到一个浮点型的数据,并赋给一个浮点型的指针。
应用推荐