ui做的好的公司网站,wordpress 做一个视频站,公司注册公司流程,网站 个人 公司 区别上一篇文章知识点太多#xff0c;我需要一一查看理解。
在运算符 ➡ 算数运算符 ➡ 操作符 ➡ // 整除#xff08;地板除#xff09; 3//4
为什么叫地板除#xff1f;
向下取整除#xff0c;就是地板除 floor division
向上取整除#xff0c;就是天花板除#xff0c;cei…上一篇文章知识点太多我需要一一查看理解。
在运算符 ➡ 算数运算符 ➡ 操作符 ➡ // 整除地板除 3//4
为什么叫地板除
向下取整除就是地板除 floor division
向上取整除就是天花板除ceil division
然而我更蒙了还有天花板除是什么难道一个除法计算还能盖房子吗
还好找到文章《“地板除”还是“取整除”—论程序员是如何被翻译误导的》
1.地板除“floor division”的根源追溯
在Lear Python APP中
1.“//” 操作符
这个符号跟“”、“-”一样都叫做“操作符”Operator。
这个操作符由两个向右的斜线forward slash组成对应英文是 “floor division”。
2.英文解释
If you imagine a room where 3 is on the ceiling and 2 is on the floor. 2.5 would fit in the middle. Floor division means the // will always take the floor or the lower number.
假想一个房间数字“3”在屋顶上数字“2”在地板上数字“2.5”处于中间。“floor division”的意思是“//”这个运算符会得到地板上的数字或者较小的那个数字。
如图地板除和天花板除
根源于
数学家高斯在1808年为“floor 函数”引入了[x]这个记号。1962年计算机科学家肯尼斯·艾佛森在他的书中引入了“floor”和“ceiling”这两个记号。
“floor 函数”也被称为“最大整数函数”greatest integer或“整数函数”entier function该函数获得的值是一个变量“x”的整数部分。
整除 or 地板除一词两译哪个才是正确的
“取整除”也是很对的“取整除”运算取的就是除法结果的整数部分。
在中文中“除法结果”有一个专门的术语叫“商”。关于“商”在英文中对应的说法叫做“quotient”。The word quotient is from the Latin quotiens, which means how many times. A quotient is the answer to a division problem. A division problem describes how many times a number will go into another. The first known usage of the word in mathematics is found around 1400-1500 AD in England.
除法问题描述的是一个数字能“进入”到另一个数字的次数。这里“进入”应该翻译成“除”。
英文中一般这样描述
Three goes into fifteen five times.
3除15得5。
16//3
This code shows that 3 goes into 16 five times
To determine the quotient and remainder of a division, use the floor division and modulo operators, respectively.
“若要通过除法运算得到商和余数可以分别使用‘取整除’(地板除)运算符和‘取模’运算符(取余运算符)。”
从编程学习者的角度来看当了解了“floor”的来历后“地板除”是一个非常形象易懂的翻译方法求“地板上的数字”。而“ceiling division”就是求“天花板上的数字”。
国内有一种译法
就将“floor”对应的取整翻译成“向下取整”把“ceiling”对应的取整翻译成“向上取整”。
终于深刻明白知友回答的意思了。
参考