You can either have a big number and a small decimal point or small number and a big decimal point.
可以小数点前面长,后面短,或者,前面短,后面长。
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.
这里没有小数点,这里没有;,这里没有浮点数值,它只是一个整型数字。
You don't need this hack of just, like, manually adding a decimal point just to fix that problem.
你不需要这样来操作,比如,手动地加入小数点来修正这个错误。
So a floating point value again is a number with a decimal point, so it depends.
一个浮点型数据就是一个,带小数点的数。
Everything from the decimal point over gets chopped off.
所有小数点后面的数值都被砍掉了。
Something with a decimal point and numbers thereafter.
也就是小数点后还有数字。
If I go back to that code from a moment ago, and I just rerun math3, notice how many places printed after the decimal point -- two?
如果刚才我回到那段代码中去,我们回到math3,请注意在小数点后面,会打印几位数呢--两位?
So it turns out there's a solution to this: If you need more precision, more digits after the decimal point than a float allows, what do you go for instead?
所以这里有一个解决方案:,如果你需要比float类型允许的更高精度,小数点后更多位数,那你该用什么取代它?
应用推荐