IT入门 > 教程 > python >
  • Python math.degrees() 方法 日期:2022-09-11 点击:1555 python

    Python math.degrees(x) 方法将角度 x 从弧度转换为度数。 PI (3.14..) 弧度等于 180 度,也就是说 1 弧度等于 57.2957795 度。 math.radians() 方法将度数值转换为弧度。 Python 版本:2.3 语法 math.degrees(...

  • Python math.dist() 方法 日期:2022-09-11 点击:7132 python

    Python math.dist(p, q) 方法返回 p 与 q 两点之间的欧几里得距离,以一个坐标序列(或可迭代对象)的形式给出。 两个点必须具有相同的维度。 传入的参数必须是正整数。 Python 版本:3.8...

  • Python math.erf() 方法 日期:2022-09-11 点击:8510 python

    Python math.erf(x) 方法返回一个数的误差函数 math.erf(x) 方法接受 - inf 和 + inf 之间的值,并返回 - 1 到 + 1 之间的值。 Python 版本:3.2 语法 math.erf() 方法语法如下: math.erf(x) 参数说明: x...

  • Python math.erfc() 方法 日期:2022-09-11 点击:6975 python

    Python math.erfc(x) 方法返回 x 处的互补误差函数。 math.erfc(x) 方法接受 - inf 和 + inf 之间的值,并返回 - 1 到 + 1 之间的值。 Python 版本:3.2 语法 math.erfc() 方法语法如下: math.erfc(x) 参数说明...

  • Python math.exp() 方法 日期:2022-09-11 点击:10139 python

    Python math.exp(x) 方法返回 e 的 x 次幂(次方)E x ,其中 e = 2.718281... 是自然对数的基数。 Python 版本:1.6.1 语法 math.exp() 方法语法如下: math.exp(x) 参数说明: x -- 必需,数字,指定指数。...

  • Python math.expm1() 方法 日期:2022-09-11 点击:6610 python

    Python math.expm1(x) 方法返回 e 的 x 次幂(次方)减 1, E x - 1 ,其中 e = 2.718281... 是自然对数的基数。 math.expm1(x) 方法比调用 math.exp() 减去 1 更精确。 Python 版本:2.7 语法 math.expm1() 方法语...

  • Python math.fabs() 方法 日期:2022-09-11 点击:3540 python

    Python math.fabs(x) 方法返回 x 的绝对值。 绝对值是非负数,有负号会删除。 与 Python 内置的 abs() 不同,此方法始终将值转换为浮点值。 语法 math.fabs() 方法语法如下: math.fabs(x) 参数说明...

  • Python math.factorial() 方法 日期:2022-09-11 点击:2623 python

    Python math.factorial(x) 方法返回 x 的阶乘。 参数只能是正整数。 一个数字的阶乘是所有整数的乘积之和,例如,6 的阶乘是: 6 x 5 x 4 x 3 x 2 x 1 = 720 。 语法 math.factorial() 方法语法如下:...

  • Python math.floor() 方法 日期:2022-09-11 点击:8246 python

    Python math.floor(x) 方法将 x 向下舍入到最接近的整数。 math.ceil() 方法将数字向上舍入到最接近的整数。 语法 math.floor() 方法语法如下: math.floor(x) 参数说明: x -- 必需,数字。如果 x 不是...

  • Python math.fmod() 方法 日期:2022-09-11 点击:8005 python

    Python math.fmod(x, y) 方法返回 x/y 的余数。 Python 版本:2.7 语法 math.fmod() 方法语法如下: math.fmod(x, y) 参数说明: x -- 必需,正数或负数。被除数。如果 x 不是一个数字,返回 TypeError。...