• Well, if we actually want to represent something like the number 7, well in binary, not actually in decimal like this.

    如果你表达,类似于7的数字,在二进制中,它和十进制可不太一样。

    哈佛公开课 - 计算机科学课程节选

  • You can either have a big number and a small decimal point or small number and a big decimal point.

    可以小数点前面长,后面短,或者,前面短,后面长。

    哈佛公开课 - 计算机科学课程节选

  • What's the biggest number you can represent with three decimal digits? Pardon?

    你们想用这3个十进制数表示什么?,请再说一遍?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • That is to say, guess the answer ahead of time, strip all the decimal places off.

    这就是说,提前猜测答案,在解答时注意进位。

    麻省理工公开课 - 固态化学导论课程节选

  • So, you can understand they really felt quite confident at this time that we could explain everything that was going on and in fact, a really telling quote from the time was said by a professor at the University of Chicago, and what he said is, "Our future discoveries must be looked for in the sixth decimal place."

    所以你可以理解,为什么当时的人那么,自信的说我们可以解释,这世界上发生的一起事情,事实上,当时有个著名的名言,是芝加哥大学的一个教授说的,他说“我们今后的科学发现,就在于弄清楚小数点第六位后的数,“

    麻省理工公开课 - 化学原理课程节选

  • 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.

    这里没有小数点,这里没有;,这里没有浮点数值,它只是一个整型数字。

    哈佛公开课 - 计算机科学课程节选

  • And there's probably more digits after the decimal place, but because of my formatting string, I only see a couple of them.

    这里可能有更多的小数位,但因为我对结果设定了格式,我们只看到两位。

    哈佛公开课 - 计算机科学课程节选

  • You don't need this hack of just, like, manually adding a decimal point just to fix that problem.

    你不需要这样来操作,比如,手动地加入小数点来修正这个错误。

    哈佛公开课 - 计算机科学课程节选

  • And just like in the decimal system, 0 as many zeros on the left that you want.

    就像在十进制中,任意放置。

    哈佛公开课 - 计算机科学课程节选

  • So a floating point value again is a number with a decimal point, so it depends.

    一个浮点型数据就是一个,带小数点的数。

    哈佛公开课 - 计算机科学课程节选

  • Well, suppose we had decimal numbers.

    假设我们有10进制数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • But all of you in this room probably remember what we technically call the base 10 system or decimal system because back in grade school or the like, you learned to count and add and subtract numbers by way of columns.

    但是,在座的每一位可能都记得,这在小学的时候学的,以10为进制的系统或者十进制系统,通过数列方式学习数数和加减法。

    哈佛公开课 - 计算机科学课程节选

  • But at the end of the day, and here's why we just went with binary and not decimal years ago, when you have one implement a computer with a physical device, it's actually really easy to represent the notion of on or off.

    但是最终,之前我们采用二进制,而不是十进制,主要是因为当我们用一台实体机器运行计算机时,这实际上很容易用开或者关的概念来表示。

    哈佛公开课 - 计算机科学课程节选

  • Something with a decimal point and numbers thereafter.

    也就是小数点后还有数字。

    哈佛公开课 - 计算机科学课程节选

  • Glancing at the bottom, this is pretty arbitrary, but I chose to format my string as follows: % 1f so at the bottom here I'm printing out %.1f, which quick sanity check means print just one digit after the decimal place.

    看下这个底部,这个是相当随意的,但我选择把我的字符串格式化成这样:,所以在这个底部我打印输出,提醒一下,这是一个只打印出,小数点后一位的方法。

    哈佛公开课 - 计算机科学课程节选

  • Seventy-nine. In fact, if you add up each of these numbers, 9 you should get the decimal number 79 79 from this binary number here.

    9,事实上,如果你把这些数字累加,你应该能从这些二进制中9,得到十进制数。

    哈佛公开课 - 计算机科学课程节选

  • Everything from the decimal point over gets chopped off.

    所有小数点后面的数值都被砍掉了。

    哈佛公开课 - 计算机科学课程节选

  • 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类型允许的更高精度,小数点后更多位数,那你该用什么取代它?

    哈佛公开课 - 计算机科学课程节选

  • And I said I'm giving you three decimal digits.

    我说给你们3个10进制数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So unlike an int, this is the type of number that can have numbers after a decimal place.

    所以,不同于int,这个类型的数字,可以有小数位。

    哈佛公开课 - 计算机科学课程节选

  • If we need a 7, this is the ones column, the twos, fours, eights, so here are our columns and this was our decimal system a moment ago, and I wanna express the number 7 and the only digits 0 I now have access to are zero and one, whereas, in decimal, dec meaning 10.

    如果你需要7,这是一位,二位,四位,八位,这是位数,刚才说的十进制的位数,我想表达7而且,只能采用数字1与,在十进制中,dec意思是十。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定